refactor(ledc): move related kconfig and linker.lf to its own folder

This commit is contained in:
Song Ruo Jing 2023-09-21 19:27:43 +08:00
parent f5f44e2ce5
commit 66821f699c
7 changed files with 27 additions and 16 deletions

View File

@ -125,6 +125,8 @@ endif()
# LEDC related source files
if(CONFIG_SOC_LEDC_SUPPORTED)
list(APPEND srcs "ledc/ledc.c")
list(APPEND ldfragments "ledc/linker.lf")
endif()
# MCPWM related source files

View File

@ -409,15 +409,7 @@ menu "Driver Configurations"
endmenu # Parallel IO Configuration
menu "LEDC Configuration"
config LEDC_CTRL_FUNC_IN_IRAM
bool "Place LEDC control functions into IRAM"
default n
help
Place LEDC control functions (ledc_update_duty and ledc_stop) into IRAM,
so that these functions can be IRAM-safe and able to be called in an IRAM context.
Enabling this option can improve driver performance as well.
endmenu # LEDC Configuration
orsource "./ledc/Kconfig.ledc"
menu "I2C Configuration"
config I2C_ISR_IRAM_SAFE

View File

@ -0,0 +1,11 @@
menu "LEDC Configuration"
config LEDC_CTRL_FUNC_IN_IRAM
bool "Place LEDC control functions into IRAM"
default n
help
Place LEDC control functions (ledc_update_duty and ledc_stop) into IRAM,
so that these functions can be IRAM-safe and able to be called in an IRAM context.
Enabling this option can improve driver performance as well.
endmenu # LEDC Configuration

View File

@ -0,0 +1,12 @@
[mapping:ledc_driver]
archive: libdriver.a
entries:
if LEDC_CTRL_FUNC_IN_IRAM = y:
ledc: ledc_stop (noflash)
ledc: ledc_update_duty (noflash)
ledc: _ledc_update_duty (noflash)
[mapping:ledc_hal]
archive: libhal.a
entries:
ledc_hal_iram (noflash)

View File

@ -15,7 +15,3 @@ entries:
if DAC_CTRL_FUNC_IN_IRAM = y:
dac_oneshot: dac_oneshot_output_voltage (noflash)
dac_continuous: dac_continuous_write_asynchronously (noflash)
if LEDC_CTRL_FUNC_IN_IRAM = y:
ledc: ledc_stop (noflash)
ledc: ledc_update_duty (noflash)
ledc: _ledc_update_duty (noflash)

View File

@ -1,4 +1,4 @@
CONFIG_FREERTOS_HZ=1000
CONFIG_ESP_TASK_WDT=n
CONFIG_ESP_TASK_WDT_INIT=n
# Disable memory protection, because "LEDC continue work after software reset" test case requires a cpu reset
CONFIG_ESP_SYSTEM_MEMPROT_FEATURE=n

View File

@ -14,8 +14,6 @@ entries:
spi_hal_iram (noflash)
if HAL_SPI_SLAVE_FUNC_IN_IRAM = y:
spi_slave_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: