diff --git a/CMakeLists.txt b/CMakeLists.txt index 618d3bd..dbfe9fe 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,13 +9,12 @@ idf_component_register( app_constant ) -option(APP_SPI_DISABLE_INVALID_STATUS_CHECK "make driver ignore `SPI_CMD_INVALID` error" OFF) -if (APP_SPI_DISABLE_INVALID_STATUS_CHECK) +# Map ESP-IDF Kconfig options to existing compile-time macros used in the codebase. +if (CONFIG_LLCC68_SPI_IGNORE_INVALID_STATUS_CHECK) target_compile_definitions(${COMPONENT_LIB} PUBLIC APP_SPI_DISABLE_INVALID_STATUS_CHECK) endif() -option(APP_RADIO_DISABLE_CALIBRATION "Disable radio calibration" ON) -if (APP_RADIO_DISABLE_CALIBRATION) +if (CONFIG_LLCC68_RADIO_DISABLE_CALIBRATION) target_compile_definitions(${COMPONENT_LIB} PUBLIC APP_RADIO_DISABLE_CALIBRATION) endif() diff --git a/Kconfig b/Kconfig new file mode 100644 index 0000000..4b736fc --- /dev/null +++ b/Kconfig @@ -0,0 +1,19 @@ +menu "LLCC68 options" + +config LLCC68_SPI_IGNORE_INVALID_STATUS_CHECK + bool "Ignore SPI_CMD_INVALID status in SPI driver" + default n + help + When enabled, the LLCC68 SPI HAL will ignore the SPI_CMD_INVALID + status returned from the device. This maps to the compile definition + APP_SPI_DISABLE_INVALID_STATUS_CHECK used in the component sources. + +config LLCC68_RADIO_DISABLE_CALIBRATION + bool "Disable radio calibration" + default y + help + When enabled, radio calibration routines are disabled to save time + or avoid issues on certain hardware. This maps to the compile + definition APP_RADIO_DISABLE_CALIBRATION used in the component. + +endmenu diff --git a/README.md b/README.md index 17459bf..7c1163c 100644 --- a/README.md +++ b/README.md @@ -7,6 +7,15 @@ Internal buffer, C++ 20 features is used. See [app_const_llcc68_template.hpp](inc/template/app_const_llcc68_template.hpp) +Configuration via menuconfig: + +- LLCC68 options → Ignore SPI_CMD_INVALID status in SPI driver + - Maps to APP_SPI_DISABLE_INVALID_STATUS_CHECK + - Default: disabled (N) +- LLCC68 options → Disable radio calibration + - Maps to APP_RADIO_DISABLE_CALIBRATION + - Default: enabled (Y) + ## TODO - [ ] Long-Range Frequency Hopping Spread Spectrum (LR-FHSS)