mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
soc_caps: Introduce SOC_LEDC_SUPPORTED and SOC_I2C_SUPPORTED caps to IDF
Wrap the ledc, i2c source files with the new caps in CMakeLists and linker.lf. This could avoid potential source file not found warning during linking time.
This commit is contained in:
parent
3b5b7e55ec
commit
6a60ecf780
@ -4,8 +4,6 @@ set(srcs
|
||||
"gpio/gpio.c"
|
||||
"gpio/rtc_io.c"
|
||||
"gptimer.c"
|
||||
"i2c.c"
|
||||
"ledc.c"
|
||||
"sdspi_crc.c"
|
||||
"sdspi_host.c"
|
||||
"sdspi_transaction.c"
|
||||
@ -23,6 +21,14 @@ if(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${target}/include")
|
||||
list(APPEND includes "${target}/include")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_LEDC_SUPPORTED)
|
||||
list(APPEND srcs "ledc.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_I2C_SUPPORTED)
|
||||
list(APPEND srcs "i2c.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_ADC_SUPPORTED)
|
||||
list(APPEND srcs "deprecated/adc_legacy.c")
|
||||
endif()
|
||||
|
@ -32,10 +32,6 @@ if(NOT BOOTLOADER_BUILD)
|
||||
"spi_slave_hal_iram.c"
|
||||
"timer_hal.c"
|
||||
"timer_hal_iram.c"
|
||||
"ledc_hal.c"
|
||||
"ledc_hal_iram.c"
|
||||
"i2c_hal.c"
|
||||
"i2c_hal_iram.c"
|
||||
"gpio_hal.c"
|
||||
"uart_hal.c"
|
||||
"uart_hal_iram.c"
|
||||
@ -50,6 +46,14 @@ if(NOT BOOTLOADER_BUILD)
|
||||
list(APPEND srcs "systimer_hal.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_LEDC_SUPPORTED)
|
||||
list(APPEND srcs "ledc_hal.c" "ledc_hal_iram.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_I2C_SUPPORTED)
|
||||
list(APPEND srcs "i2c_hal.c" "i2c_hal_iram.c")
|
||||
endif()
|
||||
|
||||
if(CONFIG_SOC_RMT_SUPPORTED)
|
||||
list(APPEND srcs "rmt_hal.c")
|
||||
endif()
|
||||
|
@ -12,8 +12,10 @@ entries:
|
||||
uart_hal_iram (default)
|
||||
spi_flash_hal_iram (noflash)
|
||||
spi_flash_encrypt_hal_iram (noflash)
|
||||
ledc_hal_iram (noflash)
|
||||
i2c_hal_iram (noflash)
|
||||
if SOC_LEDC_SUPPORTED = y:
|
||||
ledc_hal_iram (noflash)
|
||||
if SOC_I2C_SUPPORTED = y:
|
||||
i2c_hal_iram (noflash)
|
||||
if HAL_WDT_USE_ROM_IMPL = n:
|
||||
wdt_hal_iram (noflash)
|
||||
if SOC_SYSTIMER_SUPPORTED = y && HAL_SYSTIMER_USE_ROM_IMPL = n:
|
||||
|
@ -91,6 +91,14 @@ config SOC_SDM_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_LEDC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_I2C_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_SUPPORT_COEXISTENCE
|
||||
bool
|
||||
default y
|
||||
|
@ -82,6 +82,8 @@
|
||||
#define SOC_I2S_SUPPORTED 1
|
||||
#define SOC_RMT_SUPPORTED 1
|
||||
#define SOC_SDM_SUPPORTED 1
|
||||
#define SOC_LEDC_SUPPORTED 1
|
||||
#define SOC_I2C_SUPPORTED 1
|
||||
#define SOC_SUPPORT_COEXISTENCE 1
|
||||
#define SOC_AES_SUPPORTED 1
|
||||
#define SOC_MPI_SUPPORTED 1
|
||||
|
@ -43,6 +43,14 @@ config SOC_TEMP_SENSOR_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_LEDC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_I2C_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_SHA_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
@ -35,6 +35,8 @@
|
||||
#define SOC_EFUSE_KEY_PURPOSE_FIELD 0
|
||||
#define SOC_EFUSE_CONSISTS_OF_ONE_KEY_BLOCK 1
|
||||
#define SOC_TEMP_SENSOR_SUPPORTED 1
|
||||
#define SOC_LEDC_SUPPORTED 1
|
||||
#define SOC_I2C_SUPPORTED 1
|
||||
#define SOC_SHA_SUPPORTED 1
|
||||
#define SOC_ECC_SUPPORTED 1
|
||||
#define SOC_FLASH_ENC_SUPPORTED 1
|
||||
|
@ -75,6 +75,14 @@ config SOC_SDM_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_LEDC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_I2C_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_SYSTIMER_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
@ -43,6 +43,8 @@
|
||||
#define SOC_I2S_SUPPORTED 1
|
||||
#define SOC_RMT_SUPPORTED 1
|
||||
#define SOC_SDM_SUPPORTED 1
|
||||
#define SOC_LEDC_SUPPORTED 1
|
||||
#define SOC_I2C_SUPPORTED 1
|
||||
#define SOC_SYSTIMER_SUPPORTED 1
|
||||
#define SOC_SUPPORT_COEXISTENCE 1
|
||||
#define SOC_AES_SUPPORTED 1
|
||||
|
@ -63,6 +63,14 @@ config SOC_SDM_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_LEDC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_I2C_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_SYSTIMER_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
@ -48,6 +48,8 @@
|
||||
#define SOC_I2S_SUPPORTED 1
|
||||
#define SOC_RMT_SUPPORTED 1
|
||||
#define SOC_SDM_SUPPORTED 1
|
||||
#define SOC_LEDC_SUPPORTED 1
|
||||
#define SOC_I2C_SUPPORTED 1
|
||||
#define SOC_SYSTIMER_SUPPORTED 1
|
||||
#define SOC_AES_SUPPORTED 1
|
||||
#define SOC_MPI_SUPPORTED 1
|
||||
|
@ -99,6 +99,14 @@ config SOC_SDM_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_LEDC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_I2C_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_SYSTIMER_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
@ -63,6 +63,8 @@
|
||||
#define SOC_I2S_SUPPORTED 1
|
||||
#define SOC_RMT_SUPPORTED 1
|
||||
#define SOC_SDM_SUPPORTED 1
|
||||
#define SOC_LEDC_SUPPORTED 1
|
||||
#define SOC_I2C_SUPPORTED 1
|
||||
#define SOC_SYSTIMER_SUPPORTED 1
|
||||
#define SOC_SUPPORT_COEXISTENCE 0
|
||||
#define SOC_AES_SUPPORTED 1
|
||||
|
@ -151,6 +151,14 @@ config SOC_SDM_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_LEDC_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_I2C_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
||||
config SOC_SYSTIMER_SUPPORTED
|
||||
bool
|
||||
default y
|
||||
|
@ -52,6 +52,8 @@
|
||||
#define SOC_I2S_SUPPORTED 1
|
||||
#define SOC_RMT_SUPPORTED 1
|
||||
#define SOC_SDM_SUPPORTED 1
|
||||
#define SOC_LEDC_SUPPORTED 1
|
||||
#define SOC_I2C_SUPPORTED 1
|
||||
#define SOC_SYSTIMER_SUPPORTED 1
|
||||
#define SOC_SUPPORT_COEXISTENCE 1
|
||||
#define SOC_TEMP_SENSOR_SUPPORTED 1
|
||||
|
Loading…
x
Reference in New Issue
Block a user