From 67a738d1de1c0f8c66a4047d26168a0a443ba4f7 Mon Sep 17 00:00:00 2001 From: Song Ruo Jing Date: Fri, 12 Dec 2025 21:44:35 +0800 Subject: [PATCH] refactor(ledc): split ledc hal into a separate component --- components/esp_driver_ledc/CMakeLists.txt | 1 + components/esp_driver_ledc/linker.lf | 2 +- components/esp_driver_ledc/src/ledc.c | 2 +- .../test_apps/.build-test-rules.yml | 1 + .../test_apps/ledc/CMakeLists.txt | 8 ++++- .../test_apps/ledc/main/test_ledc_sleep.cpp | 2 +- components/esp_hal_ledc/CMakeLists.txt | 17 +++++++++ components/esp_hal_ledc/README.md | 35 +++++++++++++++++++ .../esp32/include/hal/ledc_ll.h | 11 +++--- .../{soc => esp_hal_ledc}/esp32/ledc_periph.c | 4 +-- .../esp32c2/include/hal/ledc_ll.h | 12 +++---- .../esp32c2/ledc_periph.c | 4 +-- .../esp32c3/include/hal/ledc_ll.h | 11 +++--- .../esp32c3/ledc_periph.c | 4 +-- .../esp32c5/include/hal/ledc_ll.h | 15 ++++---- .../esp32c5/ledc_periph.c | 5 +-- .../esp32c6/include/hal/ledc_ll.h | 9 +++-- .../esp32c6/ledc_periph.c | 5 +-- .../esp32c61/include/hal/ledc_ll.h | 15 ++++---- .../esp32c61/ledc_periph.c | 5 +-- .../esp32h2/include/hal/ledc_ll.h | 9 +++-- .../esp32h2/ledc_periph.c | 5 +-- .../esp32h21/include/hal/ledc_ll.h | 9 +++-- .../esp32h21/ledc_periph.c | 5 +-- .../esp32h4/include/hal/ledc_ll.h | 15 ++++---- .../esp32h4/ledc_periph.c | 5 +-- .../esp32p4/include/hal/ledc_ll.h | 15 ++++---- .../esp32p4/ledc_periph.c | 5 +-- .../esp32s2/include/hal/ledc_ll.h | 11 +++--- .../esp32s2}/ledc_periph.c | 4 +-- .../esp32s3/include/hal/ledc_ll.h | 11 +++--- .../esp32s3}/ledc_periph.c | 4 +-- .../include/hal/ledc_hal.h | 1 - .../include/hal}/ledc_periph.h | 6 ++-- .../include/hal/ledc_types.h | 8 ++--- components/{hal => esp_hal_ledc}/ledc_hal.c | 0 .../{hal => esp_hal_ledc}/ledc_hal_iram.c | 0 components/hal/CMakeLists.txt | 4 --- components/soc/CMakeLists.txt | 4 --- docs/doxygen/Doxyfile | 2 +- examples/peripherals/.build-test-rules.yml | 5 +-- 41 files changed, 165 insertions(+), 131 deletions(-) create mode 100644 components/esp_hal_ledc/CMakeLists.txt create mode 100644 components/esp_hal_ledc/README.md rename components/{hal => esp_hal_ledc}/esp32/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32/ledc_periph.c (82%) rename components/{hal => esp_hal_ledc}/esp32c2/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32c2/ledc_periph.c (79%) rename components/{hal => esp_hal_ledc}/esp32c3/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32c3/ledc_periph.c (79%) rename components/{hal => esp_hal_ledc}/esp32c5/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32c5/ledc_periph.c (98%) rename components/{hal => esp_hal_ledc}/esp32c6/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32c6/ledc_periph.c (98%) rename components/{hal => esp_hal_ledc}/esp32c61/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32c61/ledc_periph.c (98%) rename components/{hal => esp_hal_ledc}/esp32h2/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32h2/ledc_periph.c (98%) rename components/{hal => esp_hal_ledc}/esp32h21/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32h21/ledc_periph.c (98%) rename components/{hal => esp_hal_ledc}/esp32h4/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32h4/ledc_periph.c (99%) rename components/{hal => esp_hal_ledc}/esp32p4/include/hal/ledc_ll.h (99%) rename components/{soc => esp_hal_ledc}/esp32p4/ledc_periph.c (99%) rename components/{hal => esp_hal_ledc}/esp32s2/include/hal/ledc_ll.h (99%) rename components/{soc/esp32s3 => esp_hal_ledc/esp32s2}/ledc_periph.c (79%) rename components/{hal => esp_hal_ledc}/esp32s3/include/hal/ledc_ll.h (99%) rename components/{soc/esp32s2 => esp_hal_ledc/esp32s3}/ledc_periph.c (79%) rename components/{hal => esp_hal_ledc}/include/hal/ledc_hal.h (99%) rename components/{soc/include/soc => esp_hal_ledc/include/hal}/ledc_periph.h (90%) rename components/{hal => esp_hal_ledc}/include/hal/ledc_types.h (100%) rename components/{hal => esp_hal_ledc}/ledc_hal.c (100%) rename components/{hal => esp_hal_ledc}/ledc_hal_iram.c (100%) diff --git a/components/esp_driver_ledc/CMakeLists.txt b/components/esp_driver_ledc/CMakeLists.txt index 41b3ca9a9d..e0bf8a9f86 100644 --- a/components/esp_driver_ledc/CMakeLists.txt +++ b/components/esp_driver_ledc/CMakeLists.txt @@ -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" ) diff --git a/components/esp_driver_ledc/linker.lf b/components/esp_driver_ledc/linker.lf index c1307aebd1..cb89c6b07f 100644 --- a/components/esp_driver_ledc/linker.lf +++ b/components/esp_driver_ledc/linker.lf @@ -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) diff --git a/components/esp_driver_ledc/src/ledc.c b/components/esp_driver_ledc/src/ledc.c index f138504fe4..b030bf18eb 100644 --- a/components/esp_driver_ledc/src/ledc.c +++ b/components/esp_driver_ledc/src/ledc.c @@ -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" diff --git a/components/esp_driver_ledc/test_apps/.build-test-rules.yml b/components/esp_driver_ledc/test_apps/.build-test-rules.yml index 50e40b72c0..51bdcba99f 100644 --- a/components/esp_driver_ledc/test_apps/.build-test-rules.yml +++ b/components/esp_driver_ledc/test_apps/.build-test-rules.yml @@ -5,3 +5,4 @@ components/esp_driver_ledc/test_apps/ledc: - if: SOC_LEDC_SUPPORTED != 1 depends_components: - esp_driver_ledc + - esp_hal_ledc diff --git a/components/esp_driver_ledc/test_apps/ledc/CMakeLists.txt b/components/esp_driver_ledc/test_apps/ledc/CMakeLists.txt index 4867adf6f5..34cbeb70bd 100644 --- a/components/esp_driver_ledc/test_apps/ledc/CMakeLists.txt +++ b/components/esp_driver_ledc/test_apps/ledc/CMakeLists.txt @@ -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 diff --git a/components/esp_driver_ledc/test_apps/ledc/main/test_ledc_sleep.cpp b/components/esp_driver_ledc/test_apps/ledc/main/test_ledc_sleep.cpp index 1a3ea5c882..8fa8962b32 100644 --- a/components/esp_driver_ledc/test_apps/ledc/main/test_ledc_sleep.cpp +++ b/components/esp_driver_ledc/test_apps/ledc/main/test_ledc_sleep.cpp @@ -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" diff --git a/components/esp_hal_ledc/CMakeLists.txt b/components/esp_hal_ledc/CMakeLists.txt new file mode 100644 index 0000000000..a19547aa97 --- /dev/null +++ b/components/esp_hal_ledc/CMakeLists.txt @@ -0,0 +1,17 @@ +idf_build_get_property(target IDF_TARGET) + +set(srcs) +set(includes "include") + +# Add target-specific include directory if it exists +if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include") + list(APPEND includes "${target}/include") +endif() + +if(CONFIG_SOC_LEDC_SUPPORTED) + list(APPEND srcs "ledc_hal.c" "ledc_hal_iram.c" "${target}/ledc_periph.c") +endif() + +idf_component_register(SRCS ${srcs} + INCLUDE_DIRS ${includes} + REQUIRES soc hal) diff --git a/components/esp_hal_ledc/README.md b/components/esp_hal_ledc/README.md new file mode 100644 index 0000000000..f0478943e8 --- /dev/null +++ b/components/esp_hal_ledc/README.md @@ -0,0 +1,35 @@ +# ESP Hardware Abstraction Layer for LEDC Peripheral + +> [!NOTE] +> This component is currently in beta. Its API, behavior, and compatibility may change at any time and without notice; backward compatibility is not guaranteed. Use caution when integrating into production systems. + +## Overview + +The `esp_hal_ledc` component provides a **Hardware Abstraction Layer** for the LEDC (LED PWM Controller) peripheral across all ESP-IDF supported targets. + +## Architecture + +The LEDC HAL is structured in two main sub-layers: + +1. **HAL Layer (Upper)**: Defines the operational steps and data structures required to control LEDC (e.g., timer/channel configuration, duty updates, fade and low-power helpers). +2. **Low-Level Layer (Bottom)**: Serves as a translation layer between the HAL and the register files defined in the `soc` component, handling target-specific register configurations. + +## Features + +- Multi-timer and multi-channel PWM generation +- High-speed and low-speed modes (on supported chips) +- Duty cycle setting and smooth fading +- Timer resolution and frequency configuration +- Interrupt-driven operations +- Low-power helpers (on supported chips) + +## Usage + +The HAL functions primarily serve ESP-IDF peripheral drivers such as `esp_driver_ledc`. + +Advanced developers can use these interfaces directly when implementing custom drivers, with the understanding that API stability is not guaranteed. + +## Dependencies + +- `soc`: Provides chip-specific register definitions +- `hal`: Core hardware abstraction utilities and macros diff --git a/components/hal/esp32/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32/include/hal/ledc_ll.h index d1febc4708..80979435d0 100644 --- a/components/hal/esp32/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32/include/hal/ledc_ll.h @@ -10,14 +10,10 @@ #pragma once #include "hal/ledc_types.h" -#include "soc/ledc_periph.h" #include "soc/ledc_struct.h" +#include "soc/ledc_reg.h" #include "soc/dport_reg.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_DUTY_NUM_MAX (LEDC_DUTY_NUM_LSCH0_V) @@ -43,6 +39,10 @@ extern "C" { ((SPEED) == LEDC_HIGH_SPEED_MODE && (CLK) == LEDC_USE_APB_CLK) \ ) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -580,7 +580,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32/ledc_periph.c b/components/esp_hal_ledc/esp32/ledc_periph.c similarity index 82% rename from components/soc/esp32/ledc_periph.c rename to components/esp_hal_ledc/esp32/ledc_periph.c index 140ad209a6..27360097db 100644 --- a/components/soc/esp32/ledc_periph.c +++ b/components/esp_hal_ledc/esp32/ledc_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" /* diff --git a/components/hal/esp32c2/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32c2/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32c2/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32c2/include/hal/ledc_ll.h index 332ed2e4cb..a7ea3023c6 100644 --- a/components/hal/esp32c2/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32c2/include/hal/ledc_ll.h @@ -10,14 +10,11 @@ #pragma once #include "hal/ledc_types.h" -#include "soc/ledc_periph.h" +#include "soc/ledc_struct.h" +#include "soc/ledc_reg.h" #include "soc/system_struct.h" #include "hal/assert.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -40,6 +37,10 @@ extern "C" { #define LEDC_LL_GLOBAL_CLK_NC_BY_DEFAULT 1 #define LEDC_LL_GLOBAL_CLK_DEFAULT LEDC_SLOW_CLK_RC_FAST // The temporal global clock source to set to at least make the LEDC core clock on +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -557,7 +558,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32c2/ledc_periph.c b/components/esp_hal_ledc/esp32c2/ledc_periph.c similarity index 79% rename from components/soc/esp32c2/ledc_periph.c rename to components/esp_hal_ledc/esp32c2/ledc_periph.c index f18c6a68d1..9b6690d4dc 100644 --- a/components/soc/esp32c2/ledc_periph.c +++ b/components/esp_hal_ledc/esp32c2/ledc_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" /* diff --git a/components/hal/esp32c3/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32c3/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32c3/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32c3/include/hal/ledc_ll.h index f8bfa0f9bd..6b78ae8e85 100644 --- a/components/hal/esp32c3/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32c3/include/hal/ledc_ll.h @@ -10,15 +10,11 @@ #pragma once #include "hal/ledc_types.h" -#include "soc/ledc_periph.h" #include "soc/ledc_struct.h" +#include "soc/ledc_reg.h" #include "soc/system_struct.h" #include "hal/assert.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -42,6 +38,10 @@ extern "C" { #define LEDC_LL_GLOBAL_CLK_NC_BY_DEFAULT 1 #define LEDC_LL_GLOBAL_CLK_DEFAULT LEDC_SLOW_CLK_RC_FAST // The temporal global clock source to set to at least make the LEDC core clock on +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -559,7 +559,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32c3/ledc_periph.c b/components/esp_hal_ledc/esp32c3/ledc_periph.c similarity index 79% rename from components/soc/esp32c3/ledc_periph.c rename to components/esp_hal_ledc/esp32c3/ledc_periph.c index f18c6a68d1..9b6690d4dc 100644 --- a/components/soc/esp32c3/ledc_periph.c +++ b/components/esp_hal_ledc/esp32c3/ledc_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2020-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" /* diff --git a/components/hal/esp32c5/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32c5/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32c5/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32c5/include/hal/ledc_ll.h index a41609bd64..e3dbdc966b 100644 --- a/components/hal/esp32c5/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32c5/include/hal/ledc_ll.h @@ -18,10 +18,6 @@ #include "soc/soc_caps.h" #include "soc/soc_etm_source.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -125,6 +121,10 @@ extern "C" { [LEDC_TIMER_ETM_EVENT_OVF] = BIT(LEDC_EVT_TIME_OVF_TIMER0_EN_S), \ }}[(group)][(event)] << (timer)) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -205,8 +205,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t { (void) hw; uint32_t clk_sel_val = 3; - switch (slow_clk_sel) - { + switch (slow_clk_sel) { case LEDC_SLOW_CLK_XTAL: clk_sel_val = 0; break; @@ -234,8 +233,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t static inline void ledc_ll_get_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t *slow_clk_sel) { (void) hw; - switch (PCR.ledc_sclk_conf.ledc_sclk_sel) - { + switch (PCR.ledc_sclk_conf.ledc_sclk_sel) { case 0: *slow_clk_sel = LEDC_SLOW_CLK_XTAL; break; @@ -646,7 +644,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32c5/ledc_periph.c b/components/esp_hal_ledc/esp32c5/ledc_periph.c similarity index 98% rename from components/soc/esp32c5/ledc_periph.c rename to components/esp_hal_ledc/esp32c5/ledc_periph.c index ff6d496e4b..7cc5d7a377 100644 --- a/components/soc/esp32c5/ledc_periph.c +++ b/components/esp_hal_ledc/esp32c5/ledc_periph.c @@ -1,11 +1,12 @@ /* * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" +#include "soc/ledc_reg.h" /* Bunch of constants for every LEDC peripheral: GPIO signals diff --git a/components/hal/esp32c6/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32c6/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32c6/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32c6/include/hal/ledc_ll.h index 8627c86da0..d7d80d2984 100644 --- a/components/hal/esp32c6/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32c6/include/hal/ledc_ll.h @@ -19,10 +19,6 @@ #include "soc/soc_caps.h" #include "soc/soc_etm_source.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -129,6 +125,10 @@ extern "C" { [LEDC_TIMER_ETM_EVENT_OVF] = BIT(LEDC_EVT_TIME_OVF_TIMER0_EN_S), \ }}[(group)][(event)] << (timer)) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -768,7 +768,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32c6/ledc_periph.c b/components/esp_hal_ledc/esp32c6/ledc_periph.c similarity index 98% rename from components/soc/esp32c6/ledc_periph.c rename to components/esp_hal_ledc/esp32c6/ledc_periph.c index 87031d8263..ca09e672c3 100644 --- a/components/soc/esp32c6/ledc_periph.c +++ b/components/esp_hal_ledc/esp32c6/ledc_periph.c @@ -1,11 +1,12 @@ /* * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" +#include "soc/ledc_reg.h" /* Bunch of constants for every LEDC peripheral: GPIO signals diff --git a/components/hal/esp32c61/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32c61/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32c61/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32c61/include/hal/ledc_ll.h index 5e404899b0..339f82f935 100644 --- a/components/hal/esp32c61/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32c61/include/hal/ledc_ll.h @@ -18,10 +18,6 @@ #include "soc/soc_caps.h" #include "soc/soc_etm_source.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -125,6 +121,10 @@ extern "C" { [LEDC_TIMER_ETM_EVENT_OVF] = BIT(LEDC_EVT_TIME_OVF_TIMER0_EN_S), \ }}[(group)][(event)] << (timer)) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -205,8 +205,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t { (void) hw; uint32_t clk_sel_val = 3; - switch (slow_clk_sel) - { + switch (slow_clk_sel) { case LEDC_SLOW_CLK_XTAL: clk_sel_val = 0; break; @@ -234,8 +233,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t static inline void ledc_ll_get_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t *slow_clk_sel) { (void) hw; - switch (PCR.ledc_sclk_conf.ledc_sclk_sel) - { + switch (PCR.ledc_sclk_conf.ledc_sclk_sel) { case 0: *slow_clk_sel = LEDC_SLOW_CLK_XTAL; break; @@ -646,7 +644,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32c61/ledc_periph.c b/components/esp_hal_ledc/esp32c61/ledc_periph.c similarity index 98% rename from components/soc/esp32c61/ledc_periph.c rename to components/esp_hal_ledc/esp32c61/ledc_periph.c index b23afaf629..8e16e29361 100644 --- a/components/soc/esp32c61/ledc_periph.c +++ b/components/esp_hal_ledc/esp32c61/ledc_periph.c @@ -1,11 +1,12 @@ /* * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" +#include "soc/ledc_reg.h" /* Bunch of constants for every LEDC peripheral: GPIO signals diff --git a/components/hal/esp32h2/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32h2/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32h2/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32h2/include/hal/ledc_ll.h index abf361d60d..e2e703448f 100644 --- a/components/hal/esp32h2/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32h2/include/hal/ledc_ll.h @@ -19,10 +19,6 @@ #include "soc/soc_caps.h" #include "soc/soc_etm_source.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -126,6 +122,10 @@ extern "C" { [LEDC_TIMER_ETM_EVENT_OVF] = BIT(LEDC_EVT_TIME_OVF_TIMER0_EN_S), \ }}[(group)][(event)] << (timer)) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -765,7 +765,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32h2/ledc_periph.c b/components/esp_hal_ledc/esp32h2/ledc_periph.c similarity index 98% rename from components/soc/esp32h2/ledc_periph.c rename to components/esp_hal_ledc/esp32h2/ledc_periph.c index 87031d8263..ca09e672c3 100644 --- a/components/soc/esp32h2/ledc_periph.c +++ b/components/esp_hal_ledc/esp32h2/ledc_periph.c @@ -1,11 +1,12 @@ /* * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" +#include "soc/ledc_reg.h" /* Bunch of constants for every LEDC peripheral: GPIO signals diff --git a/components/hal/esp32h21/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32h21/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32h21/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32h21/include/hal/ledc_ll.h index 2cdff6975c..6bf9caf660 100644 --- a/components/hal/esp32h21/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32h21/include/hal/ledc_ll.h @@ -19,10 +19,6 @@ #include "soc/soc_caps.h" #include "soc/soc_etm_source.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -126,6 +122,10 @@ extern "C" { [LEDC_TIMER_ETM_EVENT_OVF] = BIT(LEDC_EVT_TIME_OVF_TIMER0_EN_S), \ }}[(group)][(event)] << (timer)) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -764,7 +764,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32h21/ledc_periph.c b/components/esp_hal_ledc/esp32h21/ledc_periph.c similarity index 98% rename from components/soc/esp32h21/ledc_periph.c rename to components/esp_hal_ledc/esp32h21/ledc_periph.c index 03bf38b102..2deb689613 100644 --- a/components/soc/esp32h21/ledc_periph.c +++ b/components/esp_hal_ledc/esp32h21/ledc_periph.c @@ -1,11 +1,12 @@ /* * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" +#include "soc/ledc_reg.h" /* Bunch of constants for every LEDC peripheral: GPIO signals diff --git a/components/hal/esp32h4/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32h4/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32h4/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32h4/include/hal/ledc_ll.h index 0da791024a..fcb6d6417e 100644 --- a/components/hal/esp32h4/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32h4/include/hal/ledc_ll.h @@ -18,10 +18,6 @@ #include "soc/soc_caps.h" #include "soc/soc_etm_source.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -125,6 +121,10 @@ extern "C" { [LEDC_TIMER_ETM_EVENT_OVF] = BIT(LEDC_EVT_TIME_OVF_TIMER0_EN_S), \ }}[(group)][(event)] << (timer)) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -211,8 +211,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t { (void) hw; uint32_t clk_sel_val = 3; - switch (slow_clk_sel) - { + switch (slow_clk_sel) { case LEDC_SLOW_CLK_XTAL: clk_sel_val = 0; break; @@ -240,8 +239,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t static inline void ledc_ll_get_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t *slow_clk_sel) { (void) hw; - switch (PCR.ledc_sclk_conf.ledc_sclk_sel) - { + switch (PCR.ledc_sclk_conf.ledc_sclk_sel) { case 0: *slow_clk_sel = LEDC_SLOW_CLK_XTAL; break; @@ -593,7 +591,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32h4/ledc_periph.c b/components/esp_hal_ledc/esp32h4/ledc_periph.c similarity index 99% rename from components/soc/esp32h4/ledc_periph.c rename to components/esp_hal_ledc/esp32h4/ledc_periph.c index 258431d489..ecff4c9081 100644 --- a/components/soc/esp32h4/ledc_periph.c +++ b/components/esp_hal_ledc/esp32h4/ledc_periph.c @@ -1,11 +1,12 @@ /* * SPDX-FileCopyrightText: 2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" +#include "soc/ledc_reg.h" /* Bunch of constants for every LEDC peripheral: GPIO signals diff --git a/components/hal/esp32p4/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32p4/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32p4/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32p4/include/hal/ledc_ll.h index 5c3a65afbf..cdcc5da36b 100644 --- a/components/hal/esp32p4/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32p4/include/hal/ledc_ll.h @@ -18,10 +18,6 @@ #include "soc/soc_caps.h" #include "soc/soc_etm_source.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -125,6 +121,10 @@ extern "C" { [LEDC_TIMER_ETM_EVENT_OVF] = BIT(LEDC_EVT_TIME_OVF_TIMER0_EN_S), \ }}[(group)][(event)] << (timer)) +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -224,8 +224,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t { (void) hw; uint32_t clk_sel_val = 3; - switch (slow_clk_sel) - { + switch (slow_clk_sel) { case LEDC_SLOW_CLK_XTAL: clk_sel_val = 0; break; @@ -260,8 +259,7 @@ static inline void ledc_ll_set_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t static inline void ledc_ll_get_slow_clk_sel(ledc_dev_t *hw, ledc_slow_clk_sel_t *slow_clk_sel) { (void) hw; - switch (HP_SYS_CLKRST.peri_clk_ctrl22.reg_ledc_clk_src_sel) - { + switch (HP_SYS_CLKRST.peri_clk_ctrl22.reg_ledc_clk_src_sel) { case 0: *slow_clk_sel = LEDC_SLOW_CLK_XTAL; break; @@ -671,7 +669,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32p4/ledc_periph.c b/components/esp_hal_ledc/esp32p4/ledc_periph.c similarity index 99% rename from components/soc/esp32p4/ledc_periph.c rename to components/esp_hal_ledc/esp32p4/ledc_periph.c index fec49c3ac4..b5de2ab6db 100644 --- a/components/soc/esp32p4/ledc_periph.c +++ b/components/esp_hal_ledc/esp32p4/ledc_periph.c @@ -1,11 +1,12 @@ /* * SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" +#include "soc/ledc_reg.h" /* Bunch of constants for every LEDC peripheral: GPIO signals diff --git a/components/hal/esp32s2/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32s2/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32s2/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32s2/include/hal/ledc_ll.h index fac0e731c6..53f332acb4 100644 --- a/components/hal/esp32s2/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32s2/include/hal/ledc_ll.h @@ -10,15 +10,11 @@ #pragma once #include "hal/ledc_types.h" -#include "soc/ledc_periph.h" #include "soc/ledc_struct.h" +#include "soc/ledc_reg.h" #include "soc/dport_reg.h" #include "hal/assert.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -47,6 +43,10 @@ extern "C" { #define LEDC_LL_GLOBAL_CLK_NC_BY_DEFAULT 1 #define LEDC_LL_GLOBAL_CLK_DEFAULT LEDC_SLOW_CLK_RC_FAST // The temporal global clock source to set to at least make the LEDC core clock on +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -598,7 +598,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32s3/ledc_periph.c b/components/esp_hal_ledc/esp32s2/ledc_periph.c similarity index 79% rename from components/soc/esp32s3/ledc_periph.c rename to components/esp_hal_ledc/esp32s2/ledc_periph.c index f08a3e2ff9..4dc339d2fa 100644 --- a/components/soc/esp32s3/ledc_periph.c +++ b/components/esp_hal_ledc/esp32s2/ledc_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" /* diff --git a/components/hal/esp32s3/include/hal/ledc_ll.h b/components/esp_hal_ledc/esp32s3/include/hal/ledc_ll.h similarity index 99% rename from components/hal/esp32s3/include/hal/ledc_ll.h rename to components/esp_hal_ledc/esp32s3/include/hal/ledc_ll.h index 873badf7fd..ced69bd3ae 100644 --- a/components/hal/esp32s3/include/hal/ledc_ll.h +++ b/components/esp_hal_ledc/esp32s3/include/hal/ledc_ll.h @@ -10,15 +10,11 @@ #pragma once #include "hal/ledc_types.h" -#include "soc/ledc_periph.h" #include "soc/ledc_struct.h" +#include "soc/ledc_reg.h" #include "soc/system_struct.h" #include "hal/assert.h" -#ifdef __cplusplus -extern "C" { -#endif - #define LEDC_LL_GET_HW() &LEDC #define LEDC_LL_CHANNEL_SUPPORT_OVF_CNT 1 @@ -42,6 +38,10 @@ extern "C" { #define LEDC_LL_GLOBAL_CLK_NC_BY_DEFAULT 1 #define LEDC_LL_GLOBAL_CLK_DEFAULT LEDC_SLOW_CLK_RC_FAST // The temporal global clock source to set to at least make the LEDC core clock on +#ifdef __cplusplus +extern "C" { +#endif + /** * @brief Enable peripheral register clock * @@ -559,7 +559,6 @@ static inline volatile void* ledc_ll_get_fade_end_intr_addr(ledc_dev_t *hw) return &hw->int_st.val; } - /** * @brief Clear fade end interrupt status * diff --git a/components/soc/esp32s2/ledc_periph.c b/components/esp_hal_ledc/esp32s3/ledc_periph.c similarity index 79% rename from components/soc/esp32s2/ledc_periph.c rename to components/esp_hal_ledc/esp32s3/ledc_periph.c index f08a3e2ff9..4dc339d2fa 100644 --- a/components/soc/esp32s2/ledc_periph.c +++ b/components/esp_hal_ledc/esp32s3/ledc_periph.c @@ -1,10 +1,10 @@ /* * SPDX-FileCopyrightText: 2015-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ -#include "soc/ledc_periph.h" +#include "hal/ledc_periph.h" #include "soc/gpio_sig_map.h" /* diff --git a/components/hal/include/hal/ledc_hal.h b/components/esp_hal_ledc/include/hal/ledc_hal.h similarity index 99% rename from components/hal/include/hal/ledc_hal.h rename to components/esp_hal_ledc/include/hal/ledc_hal.h index aba8a4bdbc..e858624440 100644 --- a/components/hal/include/hal/ledc_hal.h +++ b/components/esp_hal_ledc/include/hal/ledc_hal.h @@ -25,7 +25,6 @@ extern "C" { #endif - #if SOC_LEDC_SUPPORTED /** * Context that should be maintained by both the driver and the HAL diff --git a/components/soc/include/soc/ledc_periph.h b/components/esp_hal_ledc/include/hal/ledc_periph.h similarity index 90% rename from components/soc/include/soc/ledc_periph.h rename to components/esp_hal_ledc/include/hal/ledc_periph.h index 3488773269..6f8825884f 100644 --- a/components/soc/include/soc/ledc_periph.h +++ b/components/esp_hal_ledc/include/hal/ledc_periph.h @@ -1,14 +1,12 @@ /* * SPDX-FileCopyrightText: 2019-2025 Espressif Systems (Shanghai) CO LTD * - * SPDX-License-Identifier: Apache-2.0 OR MIT + * SPDX-License-Identifier: Apache-2.0 */ #pragma once #include "soc/soc_caps.h" -#include "soc/ledc_reg.h" -#include "soc/ledc_struct.h" #if SOC_PAU_SUPPORTED #include "soc/regdma.h" #include "soc/retention_periph_defs.h" @@ -22,7 +20,7 @@ extern "C" { Stores a bunch of per-ledc-peripheral data. */ typedef struct { - const uint8_t sig_out0_idx; + const int sig_out0_idx; } ledc_signal_conn_t; #if SOC_LEDC_SUPPORT_HS_MODE diff --git a/components/hal/include/hal/ledc_types.h b/components/esp_hal_ledc/include/hal/ledc_types.h similarity index 100% rename from components/hal/include/hal/ledc_types.h rename to components/esp_hal_ledc/include/hal/ledc_types.h index 116681c568..0a1871ac21 100644 --- a/components/hal/include/hal/ledc_types.h +++ b/components/esp_hal_ledc/include/hal/ledc_types.h @@ -6,15 +6,15 @@ #pragma once -#ifdef __cplusplus -extern "C" { -#endif - #include #include #include "soc/soc_caps.h" #include "soc/clk_tree_defs.h" +#ifdef __cplusplus +extern "C" { +#endif + typedef enum { #if SOC_LEDC_SUPPORT_HS_MODE LEDC_HIGH_SPEED_MODE = 0, /*!< LEDC high speed speed_mode */ diff --git a/components/hal/ledc_hal.c b/components/esp_hal_ledc/ledc_hal.c similarity index 100% rename from components/hal/ledc_hal.c rename to components/esp_hal_ledc/ledc_hal.c diff --git a/components/hal/ledc_hal_iram.c b/components/esp_hal_ledc/ledc_hal_iram.c similarity index 100% rename from components/hal/ledc_hal_iram.c rename to components/esp_hal_ledc/ledc_hal_iram.c diff --git a/components/hal/CMakeLists.txt b/components/hal/CMakeLists.txt index 31926a9c2e..d23cfe1dc9 100644 --- a/components/hal/CMakeLists.txt +++ b/components/hal/CMakeLists.txt @@ -84,10 +84,6 @@ elseif(NOT BOOTLOADER_BUILD) list(APPEND srcs "uart_hal.c" "uart_hal_iram.c") endif() - if(CONFIG_SOC_LEDC_SUPPORTED) - list(APPEND srcs "ledc_hal.c" "ledc_hal_iram.c") - endif() - if(CONFIG_SOC_I3C_MASTER_SUPPORTED) list(APPEND srcs "i3c_master_hal.c") endif() diff --git a/components/soc/CMakeLists.txt b/components/soc/CMakeLists.txt index 4065577425..6882795766 100644 --- a/components/soc/CMakeLists.txt +++ b/components/soc/CMakeLists.txt @@ -68,10 +68,6 @@ if(CONFIG_SOC_DEBUG_PROBE_SUPPORTED) list(APPEND srcs "${target_folder}/debug_probe_periph.c") endif() -if(CONFIG_SOC_LEDC_SUPPORTED) - list(APPEND srcs "${target_folder}/ledc_periph.c") -endif() - if(CONFIG_SOC_I3C_MASTER_SUPPORTED) list(APPEND srcs "${target_folder}/i3c_master_periph.c") endif() diff --git a/docs/doxygen/Doxyfile b/docs/doxygen/Doxyfile index 3cd69920ed..98955aba75 100644 --- a/docs/doxygen/Doxyfile +++ b/docs/doxygen/Doxyfile @@ -174,6 +174,7 @@ INPUT = \ $(PROJECT_PATH)/components/esp_hal_i2s/include/hal/i2s_types.h \ $(PROJECT_PATH)/components/esp_hal_jpeg/include/hal/jpeg_types.h \ $(PROJECT_PATH)/components/esp_hal_lcd/include/hal/lcd_types.h \ + $(PROJECT_PATH)/components/esp_hal_ledc/include/hal/ledc_types.h \ $(PROJECT_PATH)/components/esp_hal_parlio/include/hal/parlio_types.h \ $(PROJECT_PATH)/components/esp_hal_mspi/include/hal/esp_flash_err.h \ $(PROJECT_PATH)/components/esp_hal_mspi/include/hal/spi_flash_types.h \ @@ -265,7 +266,6 @@ INPUT = \ $(PROJECT_PATH)/components/freertos/FreeRTOS-Kernel/include/freertos/task.h \ $(PROJECT_PATH)/components/freertos/FreeRTOS-Kernel/include/freertos/timers.h \ $(PROJECT_PATH)/components/hal/include/hal/color_types.h \ - $(PROJECT_PATH)/components/hal/include/hal/ledc_types.h \ $(PROJECT_PATH)/components/hal/include/hal/mcpwm_types.h \ $(PROJECT_PATH)/components/hal/include/hal/sdio_slave_types.h \ $(PROJECT_PATH)/components/hal/include/hal/temperature_sensor_types.h \ diff --git a/examples/peripherals/.build-test-rules.yml b/examples/peripherals/.build-test-rules.yml index 2ac3d159c5..767912b319 100644 --- a/examples/peripherals/.build-test-rules.yml +++ b/examples/peripherals/.build-test-rules.yml @@ -272,18 +272,15 @@ examples/peripherals/ledc: - if: SOC_LEDC_SUPPORTED != 1 depends_components: - esp_driver_ledc + - esp_hal_ledc examples/peripherals/ledc/ledc_dimmer: disable: - if: SOC_ETM_SUPPORTED != 1 or SOC_LEDC_SUPPORT_ETM != 1 - depends_components: - - esp_driver_ledc examples/peripherals/ledc/ledc_gamma_curve_fade: disable: - if: SOC_LEDC_SUPPORTED != 1 or SOC_LEDC_GAMMA_CURVE_FADE_SUPPORTED != 1 - depends_components: - - esp_driver_ledc examples/peripherals/mcpwm: disable: