refactor(ledc): split ledc hal into a separate component

This commit is contained in:
Song Ruo Jing
2025-12-25 17:23:27 +08:00
parent 847840150b
commit 6ca90bd14a
41 changed files with 152 additions and 118 deletions
@@ -20,6 +20,7 @@ endif()
idf_component_register(
SRCS ${srcs}
INCLUDE_DIRS ${public_include}
REQUIRES esp_hal_ledc
PRIV_REQUIRES "${priv_requires}"
LDFRAGMENTS "linker.lf"
)
+1 -1
View File
@@ -7,7 +7,7 @@ entries:
ledc: _ledc_update_duty (noflash)
[mapping:ledc_hal]
archive: libhal.a
archive: libesp_hal_ledc.a
entries:
if SOC_LEDC_SUPPORTED = y:
ledc_hal_iram (noflash)
+1 -1
View File
@@ -12,7 +12,7 @@
#include "freertos/idf_additions.h"
#include "esp_log.h"
#include "esp_check.h"
#include "soc/ledc_periph.h"
#include "hal/ledc_periph.h"
#include "esp_clk_tree.h"
#include "soc/soc_caps.h"
#include "hal/ledc_hal.h"
@@ -9,3 +9,4 @@ components/esp_driver_ledc/test_apps/ledc:
reason: p4 rev3 migration # TODO: IDF-14398
depends_components:
- esp_driver_ledc
- esp_hal_ledc
@@ -9,10 +9,16 @@ project(ledc_test)
idf_build_get_property(elf EXECUTABLE)
if(CONFIG_COMPILER_DUMP_RTL_FILES)
set(LEDC_RTL_DIRS
${CMAKE_BINARY_DIR}/esp-idf/esp_driver_ledc
${CMAKE_BINARY_DIR}/esp-idf/hal
${CMAKE_BINARY_DIR}/esp-idf/esp_hal_ledc
)
string(JOIN "," LEDC_RTL_DIRS_JOINED ${LEDC_RTL_DIRS})
add_custom_target(
check_test_app_sections ALL
COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py
--rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_ledc/,${CMAKE_BINARY_DIR}/esp-idf/hal/
--rtl-dirs ${LEDC_RTL_DIRS_JOINED}
--elf-file ${CMAKE_BINARY_DIR}/ledc_test.elf
find-refs
--from-sections=.iram0.text
@@ -14,7 +14,7 @@
#include "esp_private/sleep_cpu.h"
#include "esp_private/esp_sleep_internal.h"
#include "esp_private/esp_pmu.h"
#include "soc/ledc_periph.h"
#include "hal/ledc_periph.h"
#include "esp_private/sleep_retention.h"
#include "esp_rom_serial_output.h"