feat(hal): graudate the adc/dac hal driver into a new component

This commit is contained in:
laokaiyao
2025-12-11 10:27:00 +08:00
parent 55537c99db
commit 841cb4caa1
64 changed files with 583 additions and 450 deletions
+7 -1
View File
@@ -6,6 +6,12 @@ endif()
set(srcs)
set(include "include")
set(priv_requires esp_driver_gpio esp_pm esp_mm)
if(${target} STREQUAL "esp32")
# ADC on esp32 is routed to I2S0, I2S driver needs to operate ADC to ensure the I2S function.
list(APPEND priv_requires esp_hal_ana_conv)
endif()
# I2S related source files
if(CONFIG_SOC_I2S_SUPPORTED)
@@ -36,7 +42,7 @@ endif()
idf_component_register(SRCS ${srcs}
INCLUDE_DIRS ${include}
PRIV_REQUIRES esp_driver_gpio esp_pm esp_mm
PRIV_REQUIRES ${priv_requires}
REQUIRES esp_hal_i2s
LDFRAGMENTS linker.lf
)
@@ -9,9 +9,17 @@ project(i2s_test)
idf_build_get_property(elf EXECUTABLE)
if(CONFIG_COMPILER_DUMP_RTL_FILES)
# Collect RTL directories in a variable for readability. Join them
# with commas so they are passed as a single --rtl-dirs argument to the script.
set(I2S_RTL_DIRS
${CMAKE_BINARY_DIR}/esp-idf/esp_driver_i2s
${CMAKE_BINARY_DIR}/esp-idf/hal
${CMAKE_BINARY_DIR}/esp-idf/esp_hal_i2s
)
string(JOIN "," I2S_RTL_DIRS_JOINED ${I2S_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_i2s/,${CMAKE_BINARY_DIR}/esp-idf/hal/
--rtl-dirs ${I2S_RTL_DIRS_JOINED}
--elf-file ${CMAKE_BINARY_DIR}/i2s_test.elf
find-refs
--from-sections=.iram0.text