diff --git a/components/bootloader_support/src/bootloader_random.c b/components/bootloader_support/src/bootloader_random.c index 0d346ae2f9..afecc32dd9 100644 --- a/components/bootloader_support/src/bootloader_random.c +++ b/components/bootloader_support/src/bootloader_random.c @@ -10,7 +10,7 @@ #ifndef BOOTLOADER_BUILD #include "esp_system.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" __attribute__((weak)) void bootloader_fill_random(void *buffer, size_t length) { diff --git a/components/bootloader_support/src/bootloader_random_esp32.c b/components/bootloader_support/src/bootloader_random_esp32.c index 747335a52f..7b9c819aa3 100644 --- a/components/bootloader_support/src/bootloader_random_esp32.c +++ b/components/bootloader_support/src/bootloader_random_esp32.c @@ -14,7 +14,7 @@ #include "soc/io_mux_reg.h" #ifndef BOOTLOADER_BUILD -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #endif void bootloader_random_enable(void) diff --git a/components/bootloader_support/src/bootloader_random_esp32s2.c b/components/bootloader_support/src/bootloader_random_esp32s2.c index efa1c80d20..fe67e5fd7b 100644 --- a/components/bootloader_support/src/bootloader_random_esp32s2.c +++ b/components/bootloader_support/src/bootloader_random_esp32s2.c @@ -17,7 +17,7 @@ #include "hal/adc_ll.h" #ifndef BOOTLOADER_BUILD -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #endif void bootloader_random_enable(void) diff --git a/components/bt/controller/esp32/bt.c b/components/bt/controller/esp32/bt.c index 09cdee59f7..672339f239 100644 --- a/components/bt/controller/esp32/bt.c +++ b/components/bt/controller/esp32/bt.c @@ -29,7 +29,7 @@ #include "esp_err.h" #include "esp_log.h" #include "esp_pm.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "soc/rtc.h" #include "soc/soc_memory_layout.h" #include "soc/dport_reg.h" diff --git a/components/bt/controller/esp32c3/bt.c b/components/bt/controller/esp32c3/bt.c index 1edf7950f4..205fb9c5d6 100644 --- a/components/bt/controller/esp32c3/bt.c +++ b/components/bt/controller/esp32c3/bt.c @@ -28,7 +28,7 @@ #include "esp_log.h" #include "esp_pm.h" #include "esp_ipc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "soc/rtc.h" #include "soc/rtc_cntl_reg.h" #include "soc/soc_memory_layout.h" diff --git a/components/bt/controller/esp32s3/bt.c b/components/bt/controller/esp32s3/bt.c index 5da5ce0eaf..2f7aa3da54 100644 --- a/components/bt/controller/esp32s3/bt.c +++ b/components/bt/controller/esp32s3/bt.c @@ -29,7 +29,7 @@ #include "esp_log.h" #include "esp_pm.h" #include "esp_ipc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "soc/rtc.h" #include "soc/rtc_cntl_reg.h" #include "soc/soc_memory_layout.h" diff --git a/components/driver/CMakeLists.txt b/components/driver/CMakeLists.txt index 849312ab7f..f76db42138 100644 --- a/components/driver/CMakeLists.txt +++ b/components/driver/CMakeLists.txt @@ -18,7 +18,7 @@ set(srcs "timer.c" "uart.c") -set(includes "include" "${target}/include") +set(includes "include" "${target}/include" "deprecated") if(${target} STREQUAL "esp32") # SDMMC and MCPWM are in ESP32 only. diff --git a/components/driver/dedic_gpio.c b/components/driver/dedic_gpio.c index 46daf61ae6..8d3299ecd7 100644 --- a/components/driver/dedic_gpio.c +++ b/components/driver/dedic_gpio.c @@ -21,7 +21,7 @@ #include "hal/cpu_hal.h" #include "hal/cpu_ll.h" #include "hal/gpio_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_rom_gpio.h" #include "freertos/FreeRTOS.h" #include "driver/dedic_gpio.h" diff --git a/components/driver/deprecated/driver/periph_ctrl.h b/components/driver/deprecated/driver/periph_ctrl.h new file mode 100644 index 0000000000..4077aacab8 --- /dev/null +++ b/components/driver/deprecated/driver/periph_ctrl.h @@ -0,0 +1,8 @@ +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once +#warning driver/periph_ctrl.h header is no longer used, and will be removed in future versions. +#include "esp_private/periph_ctrl.h" diff --git a/components/driver/esp32c3/adc.c b/components/driver/esp32c3/adc.c index 585a139550..657beb8fc2 100644 --- a/components/driver/esp32c3/adc.c +++ b/components/driver/esp32c3/adc.c @@ -18,7 +18,7 @@ #include "freertos/timers.h" #include "freertos/ringbuf.h" #include "esp32c3/rom/ets_sys.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/gpio.h" #include "driver/adc.h" #include "hal/adc_types.h" diff --git a/components/driver/esp32h2/adc.c b/components/driver/esp32h2/adc.c index 84b2cd5344..3aef90d1d5 100644 --- a/components/driver/esp32h2/adc.c +++ b/components/driver/esp32h2/adc.c @@ -18,7 +18,7 @@ #include "freertos/timers.h" #include "freertos/ringbuf.h" #include "esp32h2/rom/ets_sys.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/gpio.h" #include "driver/adc.h" #include "hal/adc_types.h" diff --git a/components/driver/esp32s2/adc.c b/components/driver/esp32s2/adc.c index a68fd46a32..2b73bd2f72 100644 --- a/components/driver/esp32s2/adc.c +++ b/components/driver/esp32s2/adc.c @@ -16,7 +16,7 @@ #include "freertos/timers.h" #include "esp_pm.h" #include "esp_intr_alloc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/rtc_io.h" #include "driver/rtc_cntl.h" #include "driver/gpio.h" diff --git a/components/driver/gdma.c b/components/driver/gdma.c index 7e64c15ed3..c9f861de5e 100644 --- a/components/driver/gdma.c +++ b/components/driver/gdma.c @@ -15,7 +15,7 @@ #include "esp_intr_alloc.h" #include "esp_log.h" #include "esp_check.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_private/gdma.h" #include "hal/gdma_hal.h" #include "hal/gdma_ll.h" diff --git a/components/driver/i2c.c b/components/driver/i2c.c index 438d1efc12..da03bcbf8f 100644 --- a/components/driver/i2c.c +++ b/components/driver/i2c.c @@ -22,7 +22,7 @@ #include "hal/gpio_hal.h" #include "soc/i2c_periph.h" #include "driver/i2c.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_rom_gpio.h" #include "esp_rom_sys.h" #include diff --git a/components/driver/i2s.c b/components/driver/i2s.c index 8fda8d7864..dbc68f1fe7 100644 --- a/components/driver/i2s.c +++ b/components/driver/i2s.c @@ -41,6 +41,7 @@ #include "esp_efuse.h" #include "esp_rom_gpio.h" #include "esp_private/i2s_platform.h" +#include "esp_private/periph_ctrl.h" #include "sdkconfig.h" diff --git a/components/driver/include/driver/i2s.h b/components/driver/include/driver/i2s.h index aa649ed479..6794c3c4d0 100644 --- a/components/driver/include/driver/i2s.h +++ b/components/driver/include/driver/i2s.h @@ -14,7 +14,6 @@ #include "soc/rtc_periph.h" #include "soc/soc_caps.h" #include "hal/i2s_types.h" -#include "driver/periph_ctrl.h" #include "esp_intr_alloc.h" #if SOC_I2S_SUPPORTS_ADC diff --git a/components/driver/include/driver/ledc.h b/components/driver/include/driver/ledc.h index bc8328cdd2..5a79535a6e 100644 --- a/components/driver/include/driver/ledc.h +++ b/components/driver/include/driver/ledc.h @@ -11,7 +11,6 @@ #include "soc/soc.h" #include "hal/ledc_types.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" #ifdef __cplusplus extern "C" { diff --git a/components/driver/include/driver/periph_ctrl.h b/components/driver/include/driver/periph_ctrl.h deleted file mode 100644 index adba0533cf..0000000000 --- a/components/driver/include/driver/periph_ctrl.h +++ /dev/null @@ -1,109 +0,0 @@ -/* - * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#ifndef _DRIVER_PERIPH_CTRL_H_ -#define _DRIVER_PERIPH_CTRL_H_ - -#include "soc/periph_defs.h" - -#ifdef __cplusplus -extern "C" { -#endif - -/** - * @brief enable peripheral module - * - * @param[in] periph : Peripheral module name - * - * Clock for the module will be ungated, and reset de-asserted. - * - * @note If periph_module_enable is called a number of times, - * periph_module_disable has to be called the same number of times - * in order to put the peripheral into disabled state. - * - * @return NULL - * - */ -void periph_module_enable(periph_module_t periph); - -/** - * @brief disable peripheral module - * - * @param[in] periph : Peripheral module name - * - * Clock for the module will be gated, reset asserted. - * - * @note If periph_module_enable is called a number of times, - * periph_module_disable has to be called the same number of times - * in order to put the peripheral into disabled state. - * - * @return NULL - * - */ -void periph_module_disable(periph_module_t periph); - -/** - * @brief reset peripheral module - * - * @param[in] periph : Peripheral module name - * - * Reset will asserted then de-assrted for the peripheral. - * - * Calling this function does not enable or disable the clock for the module. - * - * @return NULL - * - */ -void periph_module_reset(periph_module_t periph); - -/** - * @brief enable wifi bt common module - * - * @note If wifi_bt_common_module_enable is called a number of times, - * wifi_bt_common_module_disable has to be called the same number of times - * in order to put the peripheral into disabled state. - * - * @return NULL - * - */ -void wifi_bt_common_module_enable(void); - -/** - * @brief disable wifi bt common module - * - * @note If wifi_bt_common_module_enable is called a number of times, - * wifi_bt_common_module_disable has to be called the same number of times - * in order to put the peripheral into disabled state. - * - * @return NULL - * - */ -void wifi_bt_common_module_disable(void); - -/** - * @brief enable wifi module - * - * @note Enable wifi module only. - * - * @return NULL - * - */ -void wifi_module_enable(void); - -/** - * @brief disable wifi module - * - * @note Disable wifi module only. - * - * @return NULL - * - */ -void wifi_module_disable(void); -#ifdef __cplusplus -} -#endif - -#endif /* _DRIVER_PERIPH_CTRL_H_ */ diff --git a/components/driver/include/esp_private/periph_ctrl.h b/components/driver/include/esp_private/periph_ctrl.h new file mode 100644 index 0000000000..a20364bd51 --- /dev/null +++ b/components/driver/include/esp_private/periph_ctrl.h @@ -0,0 +1,79 @@ +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ +#pragma once + +#include "soc/periph_defs.h" + +#ifdef __cplusplus +extern "C" { +#endif + +/** + * @brief Enable peripheral module by un-gating the clock and de-asserting the reset signal. + * + * @param[in] periph Peripheral module + * + * @note If @c periph_module_enable() is called a number of times, + * @c periph_module_disable() has to be called the same number of times, + * in order to put the peripheral into disabled state. + */ +void periph_module_enable(periph_module_t periph); + +/** + * @brief Disable peripheral module by gating the clock and asserting the reset signal. + * + * @param[in] periph Peripheral module + * + * @note If @c periph_module_enable() is called a number of times, + * @c periph_module_disable() has to be called the same number of times, + * in order to put the peripheral into disabled state. + */ +void periph_module_disable(periph_module_t periph); + +/** + * @brief Reset peripheral module by asserting and de-asserting the reset signal. + * + * @param[in] periph Peripheral module + * + * @note Calling this function does not enable or disable the clock for the module. + */ +void periph_module_reset(periph_module_t periph); + +/** + * @brief Enable Wi-Fi and BT common module + * + * @note If @c wifi_bt_common_module_enable() is called a number of times, + * @c wifi_bt_common_module_disable() has to be called the same number of times, + * in order to put the peripheral into disabled state. + */ +void wifi_bt_common_module_enable(void); + +/** + * @brief Disable Wi-Fi and BT common module + * + * @note If @c wifi_bt_common_module_enable() is called a number of times, + * @c wifi_bt_common_module_disable() has to be called the same number of times, + * in order to put the peripheral into disabled state. + */ +void wifi_bt_common_module_disable(void); + +/** + * @brief Enable Wi-Fi module + * + * @note Calling this function will only enable Wi-Fi module. + */ +void wifi_module_enable(void); + +/** + * @brief Disable Wi-Fi module + * + * @note Calling this function will only disable Wi-Fi module. + */ +void wifi_module_disable(void); + +#ifdef __cplusplus +} +#endif diff --git a/components/driver/ledc.c b/components/driver/ledc.c index 6d82554795..e7c13ad25d 100644 --- a/components/driver/ledc.c +++ b/components/driver/ledc.c @@ -4,7 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ #include -#include +#include "esp_types.h" #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" #include "esp_log.h" @@ -19,8 +19,9 @@ #include "esp_rom_gpio.h" #include "esp_rom_sys.h" #include "soc/clk_ctrl_os.h" +#include "esp_private/periph_ctrl.h" -static const char* LEDC_TAG = "ledc"; +static const char *LEDC_TAG = "ledc"; #define LEDC_CHECK(a, str, ret_val) ESP_RETURN_ON_FALSE(a, ret_val, LEDC_TAG, "%s", str) #define LEDC_ARG_CHECK(a, param) ESP_RETURN_ON_FALSE(a, ESP_ERR_INVALID_ARG, LEDC_TAG, param " argument is invalid") @@ -127,7 +128,7 @@ static esp_err_t ledc_enable_intr_type(ledc_mode_t speed_mode, ledc_channel_t ch static void _ledc_fade_hw_acquire(ledc_mode_t mode, ledc_channel_t channel) { - ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; + ledc_fade_t *fade = s_ledc_fade_rec[mode][channel]; if (fade) { xSemaphoreTake(fade->ledc_fade_sem, portMAX_DELAY); ledc_enable_intr_type(mode, channel, LEDC_INTR_DISABLE); @@ -136,7 +137,7 @@ static void _ledc_fade_hw_acquire(ledc_mode_t mode, ledc_channel_t channel) static void _ledc_fade_hw_release(ledc_mode_t mode, ledc_channel_t channel) { - ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; + ledc_fade_t *fade = s_ledc_fade_rec[mode][channel]; if (fade) { xSemaphoreGive(fade->ledc_fade_sem); } @@ -144,7 +145,7 @@ static void _ledc_fade_hw_release(ledc_mode_t mode, ledc_channel_t channel) static void _ledc_op_lock_acquire(ledc_mode_t mode, ledc_channel_t channel) { - ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; + ledc_fade_t *fade = s_ledc_fade_rec[mode][channel]; if (fade) { xSemaphoreTake(fade->ledc_fade_mux, portMAX_DELAY); } @@ -152,7 +153,7 @@ static void _ledc_op_lock_acquire(ledc_mode_t mode, ledc_channel_t channel) static void _ledc_op_lock_release(ledc_mode_t mode, ledc_channel_t channel) { - ledc_fade_t* fade = s_ledc_fade_rec[mode][channel]; + ledc_fade_t *fade = s_ledc_fade_rec[mode][channel]; if (fade) { xSemaphoreGive(fade->ledc_fade_mux); } @@ -167,7 +168,7 @@ static uint32_t ledc_get_max_duty(ledc_mode_t speed_mode, ledc_channel_t channel } esp_err_t ledc_timer_set(ledc_mode_t speed_mode, ledc_timer_t timer_sel, uint32_t clock_divider, uint32_t duty_resolution, - ledc_clk_src_t clk_src) + ledc_clk_src_t clk_src) { LEDC_ARG_CHECK(speed_mode < LEDC_SPEED_MODE_MAX, "speed_mode"); LEDC_ARG_CHECK(timer_sel < LEDC_TIMER_MAX, "timer_select"); @@ -182,7 +183,7 @@ esp_err_t ledc_timer_set(ledc_mode_t speed_mode, ledc_timer_t timer_sel, uint32_ } static IRAM_ATTR esp_err_t ledc_duty_config(ledc_mode_t speed_mode, ledc_channel_t channel, int hpoint_val, int duty_val, - ledc_duty_direction_t duty_direction, uint32_t duty_num, uint32_t duty_cycle, uint32_t duty_scale) + ledc_duty_direction_t duty_direction, uint32_t duty_num, uint32_t duty_cycle, uint32_t duty_scale) { portENTER_CRITICAL(&ledc_spinlock); if (hpoint_val >= 0) { @@ -248,7 +249,7 @@ esp_err_t ledc_timer_resume(ledc_mode_t speed_mode, ledc_timer_t timer_sel) return ESP_OK; } -esp_err_t ledc_isr_register(void (*fn)(void*), void * arg, int intr_alloc_flags, ledc_isr_handle_t *handle) +esp_err_t ledc_isr_register(void (*fn)(void *), void *arg, int intr_alloc_flags, ledc_isr_handle_t *handle) { esp_err_t ret; LEDC_ARG_CHECK(fn, "fn"); @@ -267,7 +268,7 @@ static esp_err_t ledc_set_timer_div(ledc_mode_t speed_mode, ledc_timer_t timer_n // Calculate the divisor // User specified source clock(RTC8M_CLK) for low speed channel if ((speed_mode == LEDC_LOW_SPEED_MODE) && (clk_cfg == LEDC_USE_RTC8M_CLK)) { - if(s_ledc_slow_clk_8M == 0) { + if (s_ledc_slow_clk_8M == 0) { if (ledc_slow_clk_calibrate() == false) { goto error; } @@ -286,7 +287,7 @@ static esp_err_t ledc_set_timer_div(ledc_mode_t speed_mode, ledc_timer_t timer_n // divisor is too low goto error; } - // User specified source clock(LEDC_APB_CLK_HZ or LEDC_REF_TICK) + // User specified source clock(LEDC_APB_CLK_HZ or LEDC_REF_TICK) } else { timer_clk_src = (clk_cfg == LEDC_USE_REF_TICK) ? LEDC_REF_TICK : LEDC_APB_CLK; uint32_t src_clk_freq = ledc_get_src_clk_freq(clk_cfg); @@ -308,11 +309,11 @@ static esp_err_t ledc_set_timer_div(ledc_mode_t speed_mode, ledc_timer_t timer_n return ESP_OK; error: ESP_LOGE(LEDC_TAG, "requested frequency and duty resolution can not be achieved, try reducing freq_hz or duty_resolution. div_param=%d", - (uint32_t ) div_param); + (uint32_t ) div_param); return ESP_FAIL; } -esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf) +esp_err_t ledc_timer_config(const ledc_timer_config_t *timer_conf) { LEDC_ARG_CHECK(timer_conf != NULL, "timer_conf"); uint32_t freq_hz = timer_conf->freq_hz; @@ -331,7 +332,7 @@ esp_err_t ledc_timer_config(const ledc_timer_config_t* timer_conf) return ESP_ERR_INVALID_ARG; } - if(p_ledc_obj[speed_mode] == NULL) { + if (p_ledc_obj[speed_mode] == NULL) { p_ledc_obj[speed_mode] = (ledc_obj_t *) heap_caps_calloc(1, sizeof(ledc_obj_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); if (p_ledc_obj[speed_mode] == NULL) { return ESP_ERR_NO_MEM; @@ -353,7 +354,7 @@ esp_err_t ledc_set_pin(int gpio_num, ledc_mode_t speed_mode, ledc_channel_t ledc return ESP_OK; } -esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf) +esp_err_t ledc_channel_config(const ledc_channel_config_t *ledc_conf) { LEDC_ARG_CHECK(ledc_conf, "ledc_conf"); uint32_t speed_mode = ledc_conf->speed_mode; @@ -373,7 +374,7 @@ esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf) periph_module_enable(PERIPH_LEDC_MODULE); esp_err_t ret = ESP_OK; - if(p_ledc_obj[speed_mode] == NULL) { + if (p_ledc_obj[speed_mode] == NULL) { p_ledc_obj[speed_mode] = (ledc_obj_t *) heap_caps_calloc(1, sizeof(ledc_obj_t), MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT); if (p_ledc_obj[speed_mode] == NULL) { return ESP_ERR_NO_MEM; @@ -392,8 +393,8 @@ esp_err_t ledc_channel_config(const ledc_channel_config_t* ledc_conf) /*set interrupt type*/ ledc_enable_intr_type(speed_mode, ledc_channel, intr_type); ESP_LOGD(LEDC_TAG, "LEDC_PWM CHANNEL %1u|GPIO %02u|Duty %04u|Time %01u", - ledc_channel, gpio_num, duty, timer_select - ); + ledc_channel, gpio_num, duty, timer_select + ); /*set LEDC signal in gpio matrix*/ gpio_hal_iomux_func_sel(GPIO_PIN_MUX_REG[gpio_num], PIN_FUNC_GPIO); gpio_set_direction(gpio_num, GPIO_MODE_OUTPUT); @@ -430,7 +431,7 @@ esp_err_t ledc_stop(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t idl } esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t duty, ledc_duty_direction_t fade_direction, - uint32_t step_num, uint32_t duty_cyle_num, uint32_t duty_scale) + uint32_t step_num, uint32_t duty_cyle_num, uint32_t duty_scale) { LEDC_ARG_CHECK(speed_mode < LEDC_SPEED_MODE_MAX, "speed_mode"); LEDC_ARG_CHECK(channel < LEDC_CHANNEL_MAX, "channel"); @@ -448,7 +449,7 @@ esp_err_t ledc_set_fade(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t step_num, //uint32_t duty_num, duty_cyle_num, //uint32_t duty_cycle, duty_scale //uint32_t duty_scale - ); + ); _ledc_fade_hw_release(speed_mode, channel); return ESP_OK; } @@ -469,7 +470,7 @@ esp_err_t ledc_set_duty_with_hpoint(ledc_mode_t speed_mode, ledc_channel_t chann 1, //uint32_t duty_num, 1, //uint32_t duty_cycle, 0 //uint32_t duty_scale - ); + ); _ledc_fade_hw_release(speed_mode, channel); return ESP_OK; } @@ -489,7 +490,7 @@ esp_err_t ledc_set_duty(ledc_mode_t speed_mode, ledc_channel_t channel, uint32_t 1, //uint32_t duty_num, 1, //uint32_t duty_cycle, 0 //uint32_t duty_scale - ); + ); _ledc_fade_hw_release(speed_mode, channel); return ESP_OK; } @@ -551,7 +552,7 @@ static inline void ledc_calc_fade_end_channel(uint32_t *fade_end_status, uint32_ *channel = i; } -void IRAM_ATTR ledc_fade_isr(void* arg) +void IRAM_ATTR ledc_fade_isr(void *arg) { bool cb_yield = false; portBASE_TYPE HPTaskAwoken = pdFALSE; @@ -564,7 +565,7 @@ void IRAM_ATTR ledc_fade_isr(void* arg) continue; } ledc_hal_get_fade_end_intr_status(&(p_ledc_obj[speed_mode]->ledc_hal), &intr_status); - while(intr_status) { + while (intr_status) { ledc_calc_fade_end_channel(&intr_status, &channel); // clear interrupt @@ -671,8 +672,8 @@ static esp_err_t ledc_fade_channel_init_check(ledc_mode_t speed_mode, ledc_chann xSemaphoreGive(s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem); } if (s_ledc_fade_rec[speed_mode][channel] - && s_ledc_fade_rec[speed_mode][channel]->ledc_fade_mux - && s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem) { + && s_ledc_fade_rec[speed_mode][channel]->ledc_fade_mux + && s_ledc_fade_rec[speed_mode][channel]->ledc_fade_sem) { return ESP_OK; } else { ledc_fade_channel_deinit(speed_mode, channel); @@ -712,7 +713,7 @@ static esp_err_t _ledc_set_fade_with_step(ledc_mode_t speed_mode, ledc_channel_t if (scale > 0 && step_num > 0) { ledc_duty_config(speed_mode, channel, LEDC_VAL_NO_CHANGE, duty_cur, dir, step_num, cycle_num, scale); ESP_LOGD(LEDC_TAG, "cur duty: %d; target: %d, step: %d, cycle: %d; scale: %d; dir: %d\n", - duty_cur, target_duty, step_num, cycle_num, scale, dir); + duty_cur, target_duty, step_num, cycle_num, scale, dir); } else { ledc_duty_config(speed_mode, channel, LEDC_VAL_NO_CHANGE, target_duty, dir, 0, 1, 0); ESP_LOGD(LEDC_TAG, "Set to target duty: %d", target_duty); @@ -775,7 +776,7 @@ esp_err_t ledc_set_fade_with_time(ledc_mode_t speed_mode, ledc_channel_t channel LEDC_ARG_CHECK(channel < LEDC_CHANNEL_MAX, "channel"); LEDC_ARG_CHECK(target_duty <= ledc_get_max_duty(speed_mode, channel), "target_duty"); LEDC_CHECK(p_ledc_obj[speed_mode] != NULL, LEDC_NOT_INIT, ESP_ERR_INVALID_STATE); - LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK , LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); + LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK, LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); _ledc_fade_hw_acquire(speed_mode, channel); _ledc_set_fade_with_time(speed_mode, channel, target_duty, max_fade_time_ms); @@ -791,7 +792,7 @@ esp_err_t ledc_set_fade_with_step(ledc_mode_t speed_mode, ledc_channel_t channel LEDC_ARG_CHECK((cycle_num > 0) && (cycle_num <= LEDC_DUTY_CYCLE_MAX), "cycle_num"); LEDC_ARG_CHECK(target_duty <= ledc_get_max_duty(speed_mode, channel), "target_duty"); LEDC_CHECK(p_ledc_obj[speed_mode] != NULL, LEDC_NOT_INIT, ESP_ERR_INVALID_STATE); - LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK , LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); + LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK, LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); _ledc_fade_hw_acquire(speed_mode, channel); _ledc_set_fade_with_step(speed_mode, channel, target_duty, scale, cycle_num); @@ -840,7 +841,7 @@ esp_err_t ledc_cb_register(ledc_mode_t speed_mode, ledc_channel_t channel, ledc_ LEDC_ARG_CHECK(speed_mode < LEDC_SPEED_MODE_MAX, "speed_mode"); LEDC_ARG_CHECK(channel < LEDC_CHANNEL_MAX, "channel"); LEDC_CHECK(p_ledc_obj[speed_mode] != NULL, LEDC_NOT_INIT, ESP_ERR_INVALID_STATE); - LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK , LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); + LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK, LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); s_ledc_fade_rec[speed_mode][channel]->ledc_fade_callback = cbs->fade_cb; s_ledc_fade_rec[speed_mode][channel]->cb_user_arg = user_arg; return ESP_OK; @@ -856,7 +857,7 @@ esp_err_t ledc_set_duty_and_update(ledc_mode_t speed_mode, ledc_channel_t channe LEDC_ARG_CHECK(channel < LEDC_CHANNEL_MAX, "channel"); LEDC_ARG_CHECK(duty <= ledc_get_max_duty(speed_mode, channel), "target_duty"); LEDC_CHECK(p_ledc_obj[speed_mode] != NULL, LEDC_NOT_INIT, ESP_ERR_INVALID_STATE); - LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK , LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); + LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK, LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); _ledc_op_lock_acquire(speed_mode, channel); _ledc_fade_hw_acquire(speed_mode, channel); _ledc_set_fade_with_step(speed_mode, channel, duty, 0, 1); @@ -872,7 +873,7 @@ esp_err_t ledc_set_fade_time_and_start(ledc_mode_t speed_mode, ledc_channel_t ch LEDC_ARG_CHECK(channel < LEDC_CHANNEL_MAX, "channel"); LEDC_ARG_CHECK(fade_mode < LEDC_FADE_MAX, "fade_mode"); LEDC_CHECK(p_ledc_obj[speed_mode] != NULL, LEDC_NOT_INIT, ESP_ERR_INVALID_STATE); - LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK , LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); + LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK, LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); LEDC_ARG_CHECK(target_duty <= ledc_get_max_duty(speed_mode, channel), "target_duty"); _ledc_op_lock_acquire(speed_mode, channel); _ledc_fade_hw_acquire(speed_mode, channel); @@ -891,7 +892,7 @@ esp_err_t ledc_set_fade_step_and_start(ledc_mode_t speed_mode, ledc_channel_t ch LEDC_ARG_CHECK(channel < LEDC_CHANNEL_MAX, "channel"); LEDC_ARG_CHECK(fade_mode < LEDC_FADE_MAX, "fade_mode"); LEDC_CHECK(p_ledc_obj[speed_mode] != NULL, LEDC_NOT_INIT, ESP_ERR_INVALID_STATE); - LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK , LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); + LEDC_CHECK(ledc_fade_channel_init_check(speed_mode, channel) == ESP_OK, LEDC_FADE_INIT_ERROR_STR, ESP_FAIL); LEDC_ARG_CHECK((scale > 0) && (scale <= LEDC_DUTY_SCALE_MAX), "fade scale"); LEDC_ARG_CHECK((cycle_num > 0) && (cycle_num <= LEDC_DUTY_CYCLE_MAX), "cycle_num"); LEDC_ARG_CHECK(target_duty <= ledc_get_max_duty(speed_mode, channel), "target_duty"); diff --git a/components/driver/mcpwm.c b/components/driver/mcpwm.c index d4cb02cd28..9dcd904cd4 100644 --- a/components/driver/mcpwm.c +++ b/components/driver/mcpwm.c @@ -20,7 +20,7 @@ #include "hal/gpio_hal.h" #include "hal/mcpwm_ll.h" #include "driver/mcpwm.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" static const char *TAG = "mcpwm"; diff --git a/components/driver/pcnt.c b/components/driver/pcnt.c index 9c72378d99..96c01df322 100644 --- a/components/driver/pcnt.c +++ b/components/driver/pcnt.c @@ -8,7 +8,7 @@ #include "esp_check.h" #include "soc/soc_caps.h" #if SOC_PCNT_SUPPORTED -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/pcnt.h" #include "hal/pcnt_hal.h" #include "hal/pcnt_ll.h" diff --git a/components/driver/periph_ctrl.c b/components/driver/periph_ctrl.c index 5f30c148e7..7de3b09cbc 100644 --- a/components/driver/periph_ctrl.c +++ b/components/driver/periph_ctrl.c @@ -6,7 +6,7 @@ #include "freertos/FreeRTOS.h" #include "hal/clk_gate_ll.h" #include "esp_attr.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" static portMUX_TYPE periph_spinlock = portMUX_INITIALIZER_UNLOCKED; diff --git a/components/driver/rmt.c b/components/driver/rmt.c index e9cbe41f6f..920a21c15d 100644 --- a/components/driver/rmt.c +++ b/components/driver/rmt.c @@ -12,7 +12,7 @@ #include "esp_log.h" #include "esp_check.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/rmt.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" diff --git a/components/driver/sdio_slave.c b/components/driver/sdio_slave.c index c3b37a673e..7c7fc7f205 100644 --- a/components/driver/sdio_slave.c +++ b/components/driver/sdio_slave.c @@ -86,7 +86,7 @@ The driver of FIFOs works as below: #include "soc/gpio_periph.h" #include "hal/cpu_hal.h" #include "freertos/semphr.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/gpio.h" #include "hal/sdio_slave_hal.h" #include "hal/gpio_hal.h" diff --git a/components/driver/sdmmc_host.c b/components/driver/sdmmc_host.c index fa282254a2..d2773518e4 100644 --- a/components/driver/sdmmc_host.c +++ b/components/driver/sdmmc_host.c @@ -16,7 +16,7 @@ #include "esp_rom_sys.h" #include "driver/gpio.h" #include "driver/sdmmc_host.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "sdmmc_private.h" #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" diff --git a/components/driver/spi_common.c b/components/driver/spi_common.c index 9a3cf2dac8..6af2b6fa31 100644 --- a/components/driver/spi_common.c +++ b/components/driver/spi_common.c @@ -18,7 +18,7 @@ #include "soc/soc_pins.h" #include "soc/lldesc.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_heap_caps.h" #include "driver/spi_common_internal.h" #include "stdatomic.h" diff --git a/components/driver/test/test_i2c.c b/components/driver/test/test_i2c.c index ccf0e9d7d7..8c3cbe046b 100644 --- a/components/driver/test/test_i2c.c +++ b/components/driver/test/test_i2c.c @@ -20,7 +20,7 @@ #include "soc/i2c_periph.h" #include "esp_system.h" #include "soc/uart_struct.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_rom_gpio.h" #include "hal/gpio_hal.h" #include "hal/uart_ll.h" diff --git a/components/driver/test/test_pcnt.c b/components/driver/test/test_pcnt.c index ed094c14e9..2ddbf95b0e 100644 --- a/components/driver/test/test_pcnt.c +++ b/components/driver/test/test_pcnt.c @@ -21,7 +21,6 @@ #include "freertos/queue.h" #include "soc/soc_caps.h" #if SOC_PCNT_SUPPORTED -#include "driver/periph_ctrl.h" #include "driver/gpio.h" #include "driver/pcnt.h" #include "driver/ledc.h" diff --git a/components/driver/timer.c b/components/driver/timer.c index fcf2d438f9..43f9b0888d 100644 --- a/components/driver/timer.c +++ b/components/driver/timer.c @@ -11,7 +11,7 @@ #include "esp_intr_alloc.h" #include "freertos/FreeRTOS.h" #include "driver/timer.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "hal/timer_hal.h" #include "hal/timer_ll.h" #include "hal/check.h" diff --git a/components/driver/twai.c b/components/driver/twai.c index 17d34e9ccd..1e4f3ae1c3 100644 --- a/components/driver/twai.c +++ b/components/driver/twai.c @@ -17,7 +17,7 @@ #include "esp_attr.h" #include "esp_heap_caps.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/twai.h" #include "soc/soc_caps.h" #include "soc/twai_periph.h" diff --git a/components/driver/uart.c b/components/driver/uart.c index 2e9df759d9..0afbba86a3 100644 --- a/components/driver/uart.c +++ b/components/driver/uart.c @@ -21,7 +21,7 @@ #include "driver/uart.h" #include "driver/gpio.h" #include "driver/uart_select.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "sdkconfig.h" #include "esp_rom_gpio.h" diff --git a/components/esp_eth/src/esp_eth_mac_esp.c b/components/esp_eth/src/esp_eth_mac_esp.c index 1de969d7a6..4c8d73fbbc 100644 --- a/components/esp_eth/src/esp_eth_mac_esp.c +++ b/components/esp_eth/src/esp_eth_mac_esp.c @@ -1,20 +1,12 @@ -// Copyright 2019 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2019-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include #include -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/gpio.h" #include "esp_attr.h" #include "esp_log.h" diff --git a/components/esp_event/test/test_default_loop.c b/components/esp_event/test/test_default_loop.c index 586a360224..9aa34cc23a 100644 --- a/components/esp_event/test/test_default_loop.c +++ b/components/esp_event/test/test_default_loop.c @@ -8,7 +8,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_log.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/timer.h" #include "esp_event.h" diff --git a/components/esp_event/test/test_event.c b/components/esp_event/test/test_event.c index 0dc636cf5c..6f13af1787 100644 --- a/components/esp_event/test/test_event.c +++ b/components/esp_event/test/test_event.c @@ -7,7 +7,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "esp_log.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/timer.h" #include "esp_event.h" diff --git a/components/esp_hw_support/port/async_memcpy_impl_gdma.c b/components/esp_hw_support/port/async_memcpy_impl_gdma.c index e480d0649f..ee56d174a9 100644 --- a/components/esp_hw_support/port/async_memcpy_impl_gdma.c +++ b/components/esp_hw_support/port/async_memcpy_impl_gdma.c @@ -10,7 +10,7 @@ #include "soc/soc_caps.h" #include "hal/gdma_ll.h" #include "hal/gdma_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_log.h" #include "esp_attr.h" #include "esp_err.h" diff --git a/components/esp_hw_support/port/esp32/spiram_psram.c b/components/esp_hw_support/port/esp32/spiram_psram.c index e3de144b53..19bd6d92e7 100644 --- a/components/esp_hw_support/port/esp32/spiram_psram.c +++ b/components/esp_hw_support/port/esp32/spiram_psram.c @@ -27,7 +27,7 @@ #include "driver/gpio.h" #include "hal/gpio_hal.h" #include "driver/spi_common_internal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_common.h" #include "esp_rom_gpio.h" #include "bootloader_flash_config.h" diff --git a/components/esp_hw_support/port/esp32c3/esp_ds.c b/components/esp_hw_support/port/esp32c3/esp_ds.c index 1b63b21b96..f1d09cdf80 100644 --- a/components/esp_hw_support/port/esp32c3/esp_ds.c +++ b/components/esp_hw_support/port/esp32c3/esp_ds.c @@ -10,7 +10,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_crypto_lock.h" #include "hal/ds_hal.h" #include "hal/ds_ll.h" diff --git a/components/esp_hw_support/port/esp32c3/esp_hmac.c b/components/esp_hw_support/port/esp32c3/esp_hmac.c index 0c85d7429c..0e4850608b 100644 --- a/components/esp_hw_support/port/esp32c3/esp_hmac.c +++ b/components/esp_hw_support/port/esp32c3/esp_hmac.c @@ -5,7 +5,7 @@ */ #include -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp32c3/rom/hmac.h" #include "esp32c3/rom/ets_sys.h" #include "esp_efuse.h" diff --git a/components/esp_hw_support/port/esp32h2/esp_ds.c b/components/esp_hw_support/port/esp32h2/esp_ds.c index 6835f60f5a..247a59e5a1 100644 --- a/components/esp_hw_support/port/esp32h2/esp_ds.c +++ b/components/esp_hw_support/port/esp32h2/esp_ds.c @@ -10,7 +10,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_crypto_lock.h" #include "hal/ds_hal.h" #include "hal/ds_ll.h" diff --git a/components/esp_hw_support/port/esp32h2/esp_hmac.c b/components/esp_hw_support/port/esp32h2/esp_hmac.c index 84340d8164..9a78447dfc 100644 --- a/components/esp_hw_support/port/esp32h2/esp_hmac.c +++ b/components/esp_hw_support/port/esp32h2/esp_hmac.c @@ -5,7 +5,7 @@ */ #include -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp32c3/rom/hmac.h" #include "esp32c3/rom/ets_sys.h" #include "esp_efuse.h" diff --git a/components/esp_hw_support/port/esp32s2/spiram_psram.c b/components/esp_hw_support/port/esp32s2/spiram_psram.c index bb40c9f781..886e08b045 100644 --- a/components/esp_hw_support/port/esp32s2/spiram_psram.c +++ b/components/esp_hw_support/port/esp32s2/spiram_psram.c @@ -31,7 +31,7 @@ #include "driver/gpio.h" #include "driver/spi_common_internal.h" #include "driver/spi_common.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_common.h" #if CONFIG_SPIRAM diff --git a/components/esp_hw_support/port/esp32s3/esp_ds.c b/components/esp_hw_support/port/esp32s3/esp_ds.c index 90385de752..aa5969313c 100644 --- a/components/esp_hw_support/port/esp32s3/esp_ds.c +++ b/components/esp_hw_support/port/esp32s3/esp_ds.c @@ -10,7 +10,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/task.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_crypto_lock.h" #include "hal/ds_hal.h" #include "hal/ds_ll.h" diff --git a/components/esp_hw_support/port/esp32s3/esp_hmac.c b/components/esp_hw_support/port/esp32s3/esp_hmac.c index 73c3193a8d..a51328733a 100644 --- a/components/esp_hw_support/port/esp32s3/esp_hmac.c +++ b/components/esp_hw_support/port/esp32s3/esp_hmac.c @@ -5,7 +5,7 @@ */ #include -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp32s3/rom/efuse.h" #include "esp32s3/rom/hmac.h" #include "esp32s3/rom/ets_sys.h" diff --git a/components/esp_hw_support/port/esp32s3/opiram_psram.c b/components/esp_hw_support/port/esp32s3/opiram_psram.c index 1d188b8f9e..927479e808 100644 --- a/components/esp_hw_support/port/esp32s3/opiram_psram.c +++ b/components/esp_hw_support/port/esp32s3/opiram_psram.c @@ -23,7 +23,7 @@ #include "soc/efuse_reg.h" #include "driver/gpio.h" #include "driver/spi_common.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #if CONFIG_SPIRAM_MODE_OCT #include "soc/rtc.h" diff --git a/components/esp_hw_support/port/esp32s3/spiram_psram.c b/components/esp_hw_support/port/esp32s3/spiram_psram.c index 6c243bf2ac..ec600d7666 100644 --- a/components/esp_hw_support/port/esp32s3/spiram_psram.c +++ b/components/esp_hw_support/port/esp32s3/spiram_psram.c @@ -34,7 +34,7 @@ #include "hal/gpio_hal.h" #include "driver/spi_common_internal.h" #include "driver/spi_common.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_common.h" #if CONFIG_SPIRAM_MODE_QUAD diff --git a/components/esp_hw_support/test/test_ahb_arb.c b/components/esp_hw_support/test/test_ahb_arb.c index 65bea41cbc..9e65b81235 100644 --- a/components/esp_hw_support/test/test_ahb_arb.c +++ b/components/esp_hw_support/test/test_ahb_arb.c @@ -12,7 +12,7 @@ #include #include #include "esp32/rom/lldesc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "hal/gpio_hal.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" diff --git a/components/esp_hw_support/test/test_intr_alloc.c b/components/esp_hw_support/test/test_intr_alloc.c index 33d40bbbce..f5b41a9bbf 100644 --- a/components/esp_hw_support/test/test_intr_alloc.c +++ b/components/esp_hw_support/test/test_intr_alloc.c @@ -16,7 +16,7 @@ #include "freertos/queue.h" #include "unity.h" #include "esp_intr_alloc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "driver/timer.h" #include "soc/soc_caps.h" #include "soc/spi_periph.h" diff --git a/components/esp_hw_support/test/test_unal_dma.c b/components/esp_hw_support/test/test_unal_dma.c index c0f02a5434..96a97d497c 100644 --- a/components/esp_hw_support/test/test_unal_dma.c +++ b/components/esp_hw_support/test/test_unal_dma.c @@ -12,7 +12,7 @@ #include #include #include "esp32/rom/lldesc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "hal/gpio_hal.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" diff --git a/components/esp_lcd/src/esp_lcd_panel_io_i2s.c b/components/esp_lcd/src/esp_lcd_panel_io_i2s.c index dcd150e1d7..8313945877 100644 --- a/components/esp_lcd/src/esp_lcd_panel_io_i2s.c +++ b/components/esp_lcd/src/esp_lcd_panel_io_i2s.c @@ -32,7 +32,7 @@ #include "hal/dma_types.h" #include "hal/gpio_hal.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #if SOC_I2S_LCD_I80_VARIANT #include "esp_private/i2s_platform.h" #include "soc/lcd_periph.h" diff --git a/components/esp_lcd/src/esp_lcd_panel_io_i80.c b/components/esp_lcd/src/esp_lcd_panel_io_i80.c index 85f1fef228..6cd03c56a3 100644 --- a/components/esp_lcd/src/esp_lcd_panel_io_i80.c +++ b/components/esp_lcd/src/esp_lcd_panel_io_i80.c @@ -27,7 +27,7 @@ #include "hal/gpio_hal.h" #include "esp_private/gdma.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #if SOC_LCDCAM_SUPPORTED #include "esp_lcd_common.h" #include "soc/lcd_periph.h" diff --git a/components/esp_lcd/src/esp_lcd_rgb_panel.c b/components/esp_lcd/src/esp_lcd_rgb_panel.c index cefcdef23e..6e6cf4908f 100644 --- a/components/esp_lcd/src/esp_lcd_rgb_panel.c +++ b/components/esp_lcd/src/esp_lcd_rgb_panel.c @@ -29,7 +29,7 @@ #include "hal/gpio_hal.h" #include "esp_private/gdma.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #if CONFIG_SPIRAM #include "spiram.h" #endif diff --git a/components/esp_phy/src/phy_init.c b/components/esp_phy/src/phy_init.c index 7fd5b2c124..27283cb3cd 100644 --- a/components/esp_phy/src/phy_init.c +++ b/components/esp_phy/src/phy_init.c @@ -23,7 +23,7 @@ #include "phy.h" #include "phy_init_data.h" #include "esp_coexist_internal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_private/wifi.h" #include "esp_rom_crc.h" #include "esp_rom_sys.h" diff --git a/components/esp_serial_slave_link/essl_spi.c b/components/esp_serial_slave_link/essl_spi.c index 82d6a30571..acf41d6048 100644 --- a/components/esp_serial_slave_link/essl_spi.c +++ b/components/esp_serial_slave_link/essl_spi.c @@ -1,23 +1,15 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include #include "esp_log.h" #include "esp_check.h" #include "driver/spi_master.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "essl_internal.h" #include "essl_spi.h" #include "essl_spi/esp32s2_defs.h" diff --git a/components/esp_system/int_wdt.c b/components/esp_system/int_wdt.c index ac39ba9bcc..54a00f7bdc 100644 --- a/components/esp_system/int_wdt.c +++ b/components/esp_system/int_wdt.c @@ -18,7 +18,7 @@ #include "esp_log.h" #include "esp_freertos_hooks.h" #include "soc/timer_periph.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_int_wdt.h" #include "esp_private/system_internal.h" #include "hal/cpu_hal.h" diff --git a/components/esp_system/port/soc/esp32/clk.c b/components/esp_system/port/soc/esp32/clk.c index 8015d50d98..b6fb4ae7ff 100644 --- a/components/esp_system/port/soc/esp32/clk.c +++ b/components/esp_system/port/soc/esp32/clk.c @@ -1,24 +1,16 @@ -// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "soc/rtc.h" #include "soc/dport_reg.h" #include "soc/dport_access.h" #include "soc/i2s_reg.h" #include "hal/cpu_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_clock.h" #include "hal/wdt_hal.h" diff --git a/components/esp_system/port/soc/esp32c3/clk.c b/components/esp_system/port/soc/esp32c3/clk.c index 685c3a040b..de8bd23c5f 100644 --- a/components/esp_system/port/soc/esp32c3/clk.c +++ b/components/esp_system/port/soc/esp32c3/clk.c @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -31,7 +23,7 @@ #include "soc/i2s_reg.h" #include "hal/cpu_hal.h" #include "hal/wdt_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_clock.h" #include "soc/syscon_reg.h" #include "esp_rom_uart.h" diff --git a/components/esp_system/port/soc/esp32h2/clk.c b/components/esp_system/port/soc/esp32h2/clk.c index 52cb9e9c44..9830cd3467 100644 --- a/components/esp_system/port/soc/esp32h2/clk.c +++ b/components/esp_system/port/soc/esp32h2/clk.c @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -32,7 +24,7 @@ #include "soc/i2s_reg.h" #include "hal/cpu_hal.h" #include "hal/wdt_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_clock.h" #include "soc/syscon_reg.h" #include "esp_rom_uart.h" diff --git a/components/esp_system/port/soc/esp32s2/clk.c b/components/esp_system/port/soc/esp32s2/clk.c index 6a8e00b6e4..dbd4483e66 100644 --- a/components/esp_system/port/soc/esp32s2/clk.c +++ b/components/esp_system/port/soc/esp32s2/clk.c @@ -1,17 +1,9 @@ -// Copyright 2015-2017 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -32,7 +24,7 @@ #include "soc/i2s_reg.h" #include "hal/cpu_hal.h" #include "hal/wdt_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_clock.h" #include "soc/syscon_reg.h" #include "hal/clk_gate_ll.h" diff --git a/components/esp_system/port/soc/esp32s3/clk.c b/components/esp_system/port/soc/esp32s3/clk.c index 79b125cc04..7440ac437c 100644 --- a/components/esp_system/port/soc/esp32s3/clk.c +++ b/components/esp_system/port/soc/esp32s3/clk.c @@ -1,17 +1,9 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -32,7 +24,7 @@ #include "soc/i2s_reg.h" #include "hal/cpu_hal.h" #include "hal/wdt_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_clock.h" #include "soc/syscon_reg.h" diff --git a/components/esp_system/port/soc/esp8684/clk.c b/components/esp_system/port/soc/esp8684/clk.c index 5087ce40d8..2a0c27b6d9 100644 --- a/components/esp_system/port/soc/esp8684/clk.c +++ b/components/esp_system/port/soc/esp8684/clk.c @@ -23,7 +23,7 @@ #include "soc/rtc_periph.h" #include "hal/cpu_hal.h" #include "hal/wdt_hal.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "bootloader_clock.h" #include "soc/syscon_reg.h" #include "esp_rom_uart.h" diff --git a/components/esp_system/task_wdt.c b/components/esp_system/task_wdt.c index 079ac93587..c7bca9d9e7 100644 --- a/components/esp_system/task_wdt.c +++ b/components/esp_system/task_wdt.c @@ -22,7 +22,7 @@ #include "esp_freertos_hooks.h" #include "soc/timer_periph.h" #include "esp_log.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_task_wdt.h" #include "esp_private/system_internal.h" #include "esp_private/crosscore_int.h" diff --git a/components/esp_timer/src/esp_timer_impl_lac.c b/components/esp_timer/src/esp_timer_impl_lac.c index a9c93ef0fe..edc64dcd45 100644 --- a/components/esp_timer/src/esp_timer_impl_lac.c +++ b/components/esp_timer/src/esp_timer_impl_lac.c @@ -14,7 +14,7 @@ #include "esp_intr_alloc.h" #include "esp_log.h" #include "esp32/clk.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "soc/soc.h" #include "soc/timer_group_reg.h" #include "soc/rtc.h" diff --git a/components/esp_wifi/esp32/esp_adapter.c b/components/esp_wifi/esp32/esp_adapter.c index 0356d5e94a..0420e82b25 100644 --- a/components/esp_wifi/esp32/esp_adapter.c +++ b/components/esp_wifi/esp32/esp_adapter.c @@ -1,16 +1,8 @@ -// Copyright 2015-2018 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -42,7 +34,7 @@ #include "soc/syscon_reg.h" #include "hal/interrupt_controller_hal.h" #include "phy_init_data.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "nvs.h" #include "os.h" #include "esp_smartconfig.h" diff --git a/components/esp_wifi/esp32c3/esp_adapter.c b/components/esp_wifi/esp32c3/esp_adapter.c index 9394f3cc55..aad0ae9bcb 100644 --- a/components/esp_wifi/esp32c3/esp_adapter.c +++ b/components/esp_wifi/esp32c3/esp_adapter.c @@ -36,7 +36,7 @@ #include "soc/rtc.h" #include "soc/syscon_reg.h" #include "phy_init_data.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "nvs.h" #include "os.h" #include "esp_smartconfig.h" diff --git a/components/esp_wifi/esp32s2/esp_adapter.c b/components/esp_wifi/esp32s2/esp_adapter.c index 0b7bfa3556..99834df486 100644 --- a/components/esp_wifi/esp32s2/esp_adapter.c +++ b/components/esp_wifi/esp32s2/esp_adapter.c @@ -36,7 +36,7 @@ #include "soc/syscon_reg.h" #include "hal/interrupt_controller_hal.h" #include "phy_init_data.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "nvs.h" #include "os.h" #include "esp_smartconfig.h" diff --git a/components/esp_wifi/esp32s3/esp_adapter.c b/components/esp_wifi/esp32s3/esp_adapter.c index 78c978106b..d75d0f5067 100644 --- a/components/esp_wifi/esp32s3/esp_adapter.c +++ b/components/esp_wifi/esp32s3/esp_adapter.c @@ -1,16 +1,8 @@ -// Copyright 2015-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at - -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2015-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include #include @@ -44,7 +36,7 @@ #include "soc/syscon_reg.h" #include "hal/interrupt_controller_hal.h" #include "phy_init_data.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "nvs.h" #include "os.h" #include "esp_smartconfig.h" diff --git a/components/mbedtls/port/aes/block/esp_aes.c b/components/mbedtls/port/aes/block/esp_aes.c index 083d17a5d8..003ffcc398 100644 --- a/components/mbedtls/port/aes/block/esp_aes.c +++ b/components/mbedtls/port/aes/block/esp_aes.c @@ -38,7 +38,7 @@ #include "soc/cpu.h" #include -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" /* AES uses a spinlock mux not a lock as the underlying block operation diff --git a/components/mbedtls/port/aes/dma/esp_aes.c b/components/mbedtls/port/aes/dma/esp_aes.c index 1cd854000e..c3b19d45b2 100644 --- a/components/mbedtls/port/aes/dma/esp_aes.c +++ b/components/mbedtls/port/aes/dma/esp_aes.c @@ -29,7 +29,7 @@ #include #include "mbedtls/aes.h" #include "esp_intr_alloc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_log.h" #include "soc/lldesc.h" #include "esp_heap_caps.h" diff --git a/components/mbedtls/port/esp32/bignum.c b/components/mbedtls/port/esp32/bignum.c index 47283a6f83..ec2ff1cf75 100644 --- a/components/mbedtls/port/esp32/bignum.c +++ b/components/mbedtls/port/esp32/bignum.c @@ -23,7 +23,7 @@ #include "soc/hwcrypto_periph.h" #include "soc/dport_reg.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include #include "bignum_impl.h" #include diff --git a/components/mbedtls/port/esp32c3/bignum.c b/components/mbedtls/port/esp32c3/bignum.c index b2639639d5..dd61535ba0 100644 --- a/components/mbedtls/port/esp32c3/bignum.c +++ b/components/mbedtls/port/esp32c3/bignum.c @@ -23,7 +23,7 @@ #include #include #include "soc/hwcrypto_periph.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "mbedtls/bignum.h" #include "bignum_impl.h" #include "soc/system_reg.h" diff --git a/components/mbedtls/port/esp32h2/bignum.c b/components/mbedtls/port/esp32h2/bignum.c index 75d5336270..458d7d1b2c 100644 --- a/components/mbedtls/port/esp32h2/bignum.c +++ b/components/mbedtls/port/esp32h2/bignum.c @@ -23,7 +23,7 @@ #include #include #include "soc/hwcrypto_periph.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "mbedtls/bignum.h" #include "bignum_impl.h" #include "soc/system_reg.h" diff --git a/components/mbedtls/port/esp32s2/bignum.c b/components/mbedtls/port/esp32s2/bignum.c index 259f02349c..6b23e91098 100644 --- a/components/mbedtls/port/esp32s2/bignum.c +++ b/components/mbedtls/port/esp32s2/bignum.c @@ -21,7 +21,7 @@ * */ #include "soc/hwcrypto_periph.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include #include "bignum_impl.h" #include "soc/dport_reg.h" diff --git a/components/mbedtls/port/esp32s3/bignum.c b/components/mbedtls/port/esp32s3/bignum.c index b4bbd60726..09ec4b7d64 100644 --- a/components/mbedtls/port/esp32s3/bignum.c +++ b/components/mbedtls/port/esp32s3/bignum.c @@ -21,7 +21,7 @@ * */ #include "soc/hwcrypto_periph.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include #include "bignum_impl.h" #include "soc/dport_reg.h" diff --git a/components/mbedtls/port/sha/dma/sha.c b/components/mbedtls/port/sha/dma/sha.c index fc18f28887..c8f77f00f5 100644 --- a/components/mbedtls/port/sha/dma/sha.c +++ b/components/mbedtls/port/sha/dma/sha.c @@ -38,7 +38,7 @@ #include "freertos/FreeRTOS.h" #include "freertos/semphr.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "sys/param.h" #include "sha/sha_dma.h" diff --git a/components/mbedtls/port/sha/parallel_engine/sha.c b/components/mbedtls/port/sha/parallel_engine/sha.c index a87ced376a..c2bd5c6984 100644 --- a/components/mbedtls/port/sha/parallel_engine/sha.c +++ b/components/mbedtls/port/sha/parallel_engine/sha.c @@ -37,7 +37,7 @@ #include "hal/sha_types.h" #include "sha/sha_parallel_engine.h" #include "soc/hwcrypto_periph.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" /* Single spinlock for SHA engine memory block diff --git a/components/tinyusb/additions/src/tinyusb.c b/components/tinyusb/additions/src/tinyusb.c index 130a5884a0..72b1b612fc 100644 --- a/components/tinyusb/additions/src/tinyusb.c +++ b/components/tinyusb/additions/src/tinyusb.c @@ -1,20 +1,12 @@ -// Copyright 2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2020-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ #include "sdkconfig.h" #include "driver/gpio.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_log.h" #include "esp_check.h" #include "esp_rom_gpio.h" diff --git a/components/usb/hcd.c b/components/usb/hcd.c index d28b943e42..589fe2da6b 100644 --- a/components/usb/hcd.c +++ b/components/usb/hcd.c @@ -19,7 +19,7 @@ #include "hal/usb_types_private.h" #include "soc/gpio_pins.h" #include "soc/gpio_sig_map.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "hcd.h" #include "usb_private.h" #include "usb/usb_types_ch9.h" diff --git a/components/usb/usb_phy.c b/components/usb/usb_phy.c index 62fbb78f56..0df895e977 100644 --- a/components/usb/usb_phy.c +++ b/components/usb/usb_phy.c @@ -9,7 +9,7 @@ #include "freertos/FreeRTOS.h" #include "esp_log.h" #include "esp_check.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "esp_private/usb_phy.h" #include "soc/usb_phy_periph.h" #include "hal/usb_phy_hal.h" diff --git a/examples/bluetooth/esp_ble_mesh/common_components/light_driver/iot_light.c b/examples/bluetooth/esp_ble_mesh/common_components/light_driver/iot_light.c index 884f7b551b..7c14dfd893 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/light_driver/iot_light.c +++ b/examples/bluetooth/esp_ble_mesh/common_components/light_driver/iot_light.c @@ -14,7 +14,6 @@ #include "soc/ledc_reg.h" #include "soc/timer_group_struct.h" #include "soc/ledc_struct.h" -#include "driver/periph_ctrl.h" #include "driver/timer.h" #include "driver/ledc.h" #include "iot_light.h" diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32/main/controller_hci_uart_demo.c b/examples/bluetooth/hci/controller_hci_uart_esp32/main/controller_hci_uart_demo.c index 9aff571570..3a091248a4 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32/main/controller_hci_uart_demo.c +++ b/examples/bluetooth/hci/controller_hci_uart_esp32/main/controller_hci_uart_demo.c @@ -10,7 +10,7 @@ #include "esp_bt.h" #include "soc/uhci_periph.h" #include "driver/uart.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" // for enabling UHCI module, remove it after UHCI driver is released #include "esp_log.h" static const char *tag = "CONTROLLER_UART_HCI"; diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32c3/main/uhci_uart_demo.c b/examples/bluetooth/hci/controller_hci_uart_esp32c3/main/uhci_uart_demo.c index 79baa1f166..37c117f508 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32c3/main/uhci_uart_demo.c +++ b/examples/bluetooth/hci/controller_hci_uart_esp32c3/main/uhci_uart_demo.c @@ -7,7 +7,7 @@ */ #include -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" // for enabling UHCI module, remove it after UHCI driver is released #include "driver/gpio.h" #include "driver/uart.h" #include "soc/lldesc.h" diff --git a/tools/ci/check_copyright_ignore.txt b/tools/ci/check_copyright_ignore.txt index 5f27285a94..fe6de24262 100644 --- a/tools/ci/check_copyright_ignore.txt +++ b/tools/ci/check_copyright_ignore.txt @@ -592,7 +592,6 @@ components/esp_eth/include/eth_phy_regs_struct.h components/esp_eth/src/dm9051.h components/esp_eth/src/esp_eth.c components/esp_eth/src/esp_eth_mac_dm9051.c -components/esp_eth/src/esp_eth_mac_esp.c components/esp_eth/src/esp_eth_mac_openeth.c components/esp_eth/src/esp_eth_mac_w5500.c components/esp_eth/src/esp_eth_netif_glue.c @@ -906,7 +905,6 @@ components/esp_rom/test/test_tjpgd.c components/esp_serial_slave_link/essl.c components/esp_serial_slave_link/essl_internal.h components/esp_serial_slave_link/essl_sdio.c -components/esp_serial_slave_link/essl_spi.c components/esp_serial_slave_link/include/esp_serial_slave_link/essl.h components/esp_serial_slave_link/include/esp_serial_slave_link/essl_sdio.h components/esp_serial_slave_link/include/esp_serial_slave_link/essl_spi.h @@ -941,30 +939,25 @@ components/esp_system/port/public_compat/cache_err_int.h components/esp_system/port/public_compat/trax.h components/esp_system/port/soc/esp32/cache_err_int.c components/esp_system/port/soc/esp32/cache_err_int.h -components/esp_system/port/soc/esp32/clk.c components/esp_system/port/soc/esp32/intr.c components/esp_system/port/soc/esp32/reset_reason.c components/esp_system/port/soc/esp32/system_internal.c components/esp_system/port/soc/esp32c3/apb_backup_dma.c components/esp_system/port/soc/esp32c3/cache_err_int.c components/esp_system/port/soc/esp32c3/cache_err_int.h -components/esp_system/port/soc/esp32c3/clk.c components/esp_system/port/soc/esp32c3/reset_reason.c components/esp_system/port/soc/esp32c3/system_internal.c components/esp_system/port/soc/esp32h2/apb_backup_dma.c components/esp_system/port/soc/esp32h2/cache_err_int.c components/esp_system/port/soc/esp32h2/cache_err_int.h -components/esp_system/port/soc/esp32h2/clk.c components/esp_system/port/soc/esp32h2/reset_reason.c components/esp_system/port/soc/esp32h2/system_internal.c components/esp_system/port/soc/esp32s2/cache_err_int.c components/esp_system/port/soc/esp32s2/cache_err_int.h -components/esp_system/port/soc/esp32s2/clk.c components/esp_system/port/soc/esp32s2/reset_reason.c components/esp_system/port/soc/esp32s2/system_internal.c components/esp_system/port/soc/esp32s2/usb_console.c components/esp_system/port/soc/esp32s3/cache_err_int.h -components/esp_system/port/soc/esp32s3/clk.c components/esp_system/port/soc/esp32s3/reset_reason.c components/esp_system/port/soc/esp32s3/system_internal.c components/esp_system/port/soc/esp32s3/usb_console.c @@ -987,8 +980,6 @@ components/esp_timer/test/test_ets_timer.c components/esp_websocket_client/esp_websocket_client.c components/esp_websocket_client/include/esp_websocket_client.h components/esp_websocket_client/test/test_websocket_client.c -components/esp_wifi/esp32/esp_adapter.c -components/esp_wifi/esp32s3/esp_adapter.c components/esp_wifi/include/esp_coexist_adapter.h components/esp_wifi/include/esp_mesh.h components/esp_wifi/include/esp_mesh_internal.h @@ -2434,7 +2425,6 @@ components/tinyusb/additions/include_private/descriptors_control.h components/tinyusb/additions/include_private/usb_descriptors.h components/tinyusb/additions/src/cdc.c components/tinyusb/additions/src/descriptors_control.c -components/tinyusb/additions/src/tinyusb.c components/tinyusb/additions/src/tusb_cdc_acm.c components/tinyusb/additions/src/tusb_console.c components/tinyusb/additions/src/tusb_tasks.c @@ -3753,7 +3743,6 @@ tools/unit-test-app/components/test_utils/ccomp_timer_impl_xtensa.c tools/unit-test-app/components/test_utils/include/ccomp_timer.h tools/unit-test-app/components/test_utils/include/test_utils.h tools/unit-test-app/components/test_utils/private_include/ccomp_timer_impl.h -tools/unit-test-app/components/test_utils/ref_clock_impl_rmt_pcnt.c tools/unit-test-app/components/test_utils/test/ccomp_timer_test_api.c tools/unit-test-app/components/test_utils/test/ccomp_timer_test_data.c tools/unit-test-app/components/test_utils/test/ccomp_timer_test_inst.c diff --git a/tools/unit-test-app/components/test_utils/ref_clock_impl_rmt_pcnt.c b/tools/unit-test-app/components/test_utils/ref_clock_impl_rmt_pcnt.c index d156d75bfb..b1cde08800 100644 --- a/tools/unit-test-app/components/test_utils/ref_clock_impl_rmt_pcnt.c +++ b/tools/unit-test-app/components/test_utils/ref_clock_impl_rmt_pcnt.c @@ -1,16 +1,8 @@ -// Copyright 2017-2020 Espressif Systems (Shanghai) PTE LTD -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. +/* + * SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD + * + * SPDX-License-Identifier: Apache-2.0 + */ /** * Some unit test cases need to have access to reliable timestamps even when CPU and APB clock frequencies change over time. @@ -31,7 +23,7 @@ #include "test_utils.h" #include "freertos/FreeRTOS.h" #include "esp_intr_alloc.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "soc/gpio_sig_map.h" #include "soc/gpio_periph.h" #include "soc/soc_caps.h" diff --git a/tools/unit-test-app/components/test_utils/ref_clock_impl_timergroup.c b/tools/unit-test-app/components/test_utils/ref_clock_impl_timergroup.c index c64793b73a..513d667112 100644 --- a/tools/unit-test-app/components/test_utils/ref_clock_impl_timergroup.c +++ b/tools/unit-test-app/components/test_utils/ref_clock_impl_timergroup.c @@ -5,7 +5,7 @@ */ #include "test_utils.h" -#include "driver/periph_ctrl.h" +#include "esp_private/periph_ctrl.h" #include "soc/periph_defs.h" #include "hal/timer_hal.h" #include "hal/timer_ll.h"