diff --git a/components/esp_driver_gptimer/src/gptimer.c b/components/esp_driver_gptimer/src/gptimer.c index 447aebfbbf..f1d4af4664 100644 --- a/components/esp_driver_gptimer/src/gptimer.c +++ b/components/esp_driver_gptimer/src/gptimer.c @@ -272,6 +272,9 @@ esp_err_t gptimer_set_alarm_action(gptimer_handle_t timer, const gptimer_alarm_c { ESP_RETURN_ON_FALSE_ISR(timer, ESP_ERR_INVALID_ARG, TAG, "invalid argument"); if (config) { +#if CONFIG_GPTIMER_CTRL_FUNC_IN_IRAM + ESP_RETURN_ON_FALSE_ISR(esp_ptr_internal(config), ESP_ERR_INVALID_ARG, TAG, "alarm config struct not in internal RAM"); +#endif // When auto_reload is enabled, alarm_count should not be equal to reload_count bool valid_auto_reload = !config->flags.auto_reload_on_alarm || config->alarm_count != config->reload_count; ESP_RETURN_ON_FALSE_ISR(valid_auto_reload, ESP_ERR_INVALID_ARG, TAG, "reload count can't equal to alarm count"); diff --git a/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_rx.c b/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_rx.c index ee9fd6ccf7..b418b39ca1 100644 --- a/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_rx.c +++ b/components/esp_driver_rmt/test_apps/rmt/main/test_rmt_rx.c @@ -334,9 +334,6 @@ static void test_rmt_receive_filter(rmt_clock_source_t clk_src) rmt_channel_handle_t rx_channel = NULL; TEST_ESP_OK(rmt_new_rx_channel(&rx_channel_cfg, &rx_channel)); - // initialize the GPIO level to low - TEST_ESP_OK(gpio_set_level(TEST_RMT_GPIO_NUM_A, 0)); - printf("register rx event callbacks\r\n"); rmt_rx_event_callbacks_t cbs = { .on_recv_done = test_rmt_received_done, diff --git a/components/esp_hw_support/port/esp32/rtc_time.c b/components/esp_hw_support/port/esp32/rtc_time.c index 0e54fdb93f..a967ade043 100644 --- a/components/esp_hw_support/port/esp32/rtc_time.c +++ b/components/esp_hw_support/port/esp32/rtc_time.c @@ -203,9 +203,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32c2/rtc_time.c b/components/esp_hw_support/port/esp32c2/rtc_time.c index 9e4ebcedb4..9adf6f9706 100644 --- a/components/esp_hw_support/port/esp32c2/rtc_time.c +++ b/components/esp_hw_support/port/esp32c2/rtc_time.c @@ -36,7 +36,7 @@ uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) { /* On ESP32-C2, choosing RTC_CAL_RTC_MUX results in calibration of - * the 150k RTC clock regardless of the currenlty selected SLOW_CLK. + * the 150k RTC clock regardless of the currently selected SLOW_CLK. * On the ESP32, it used the currently selected SLOW_CLK. * The following code emulates ESP32 behavior: */ @@ -203,9 +203,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32c3/rtc_time.c b/components/esp_hw_support/port/esp32c3/rtc_time.c index c9535913cb..0dd9cecfd9 100644 --- a/components/esp_hw_support/port/esp32c3/rtc_time.c +++ b/components/esp_hw_support/port/esp32c3/rtc_time.c @@ -36,7 +36,7 @@ uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) { /* On ESP32C3, choosing RTC_CAL_RTC_MUX results in calibration of - * the 150k RTC clock regardless of the currenlty selected SLOW_CLK. + * the 150k RTC clock regardless of the currently selected SLOW_CLK. * On the ESP32, it used the currently selected SLOW_CLK. * The following code emulates ESP32 behavior: */ @@ -206,9 +206,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32c5/rtc_time.c b/components/esp_hw_support/port/esp32c5/rtc_time.c index acf1b19fcd..1dc1db72d6 100644 --- a/components/esp_hw_support/port/esp32c5/rtc_time.c +++ b/components/esp_hw_support/port/esp32c5/rtc_time.c @@ -83,7 +83,7 @@ static uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cyc /* Enable requested clock (150k clock is always on) */ // All clocks on/off takes time to be stable, so we shouldn't frequently enable/disable the clock - // Only enable if orignally was disabled, and set back to the disable state after calibration is done + // Only enable if originally was disabled, and set back to the disable state after calibration is done // If the clock is already on, then do nothing bool dig_32k_xtal_enabled = clk_ll_xtal32k_digi_is_enabled(); if (cal_clk == RTC_CAL_32K_XTAL && !dig_32k_xtal_enabled) { @@ -277,9 +277,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32c6/rtc_time.c b/components/esp_hw_support/port/esp32c6/rtc_time.c index d7877ca452..98896e786c 100644 --- a/components/esp_hw_support/port/esp32c6/rtc_time.c +++ b/components/esp_hw_support/port/esp32c6/rtc_time.c @@ -81,7 +81,7 @@ static uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cyc /* Enable requested clock (150k clock is always on) */ // All clocks on/off takes time to be stable, so we shouldn't frequently enable/disable the clock - // Only enable if orignally was disabled, and set back to the disable state after calibration is done + // Only enable if originally was disabled, and set back to the disable state after calibration is done // If the clock is already on, then do nothing bool dig_32k_xtal_enabled = clk_ll_xtal32k_digi_is_enabled(); if (cal_clk == RTC_CAL_32K_XTAL && !dig_32k_xtal_enabled) { @@ -283,9 +283,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32c61/rtc_time.c b/components/esp_hw_support/port/esp32c61/rtc_time.c index eedef8555a..182d32ee3f 100644 --- a/components/esp_hw_support/port/esp32c61/rtc_time.c +++ b/components/esp_hw_support/port/esp32c61/rtc_time.c @@ -280,9 +280,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32h2/rtc_time.c b/components/esp_hw_support/port/esp32h2/rtc_time.c index d8f5826e33..708fedcb20 100644 --- a/components/esp_hw_support/port/esp32h2/rtc_time.c +++ b/components/esp_hw_support/port/esp32h2/rtc_time.c @@ -81,7 +81,7 @@ static uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cyc /* Enable requested clock (150k clock is always on) */ // All clocks on/off takes time to be stable, so we shouldn't frequently enable/disable the clock - // Only enable if orignally was disabled, and set back to the disable state after calibration is done + // Only enable if originally was disabled, and set back to the disable state after calibration is done // If the clock is already on, then do nothing bool dig_32k_xtal_enabled = clk_ll_xtal32k_digi_is_enabled(); if (cal_clk == RTC_CAL_32K_XTAL && !dig_32k_xtal_enabled) { @@ -283,9 +283,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32p4/rtc_time.c b/components/esp_hw_support/port/esp32p4/rtc_time.c index 7bc3674eb1..b1a5ae6674 100644 --- a/components/esp_hw_support/port/esp32p4/rtc_time.c +++ b/components/esp_hw_support/port/esp32p4/rtc_time.c @@ -69,7 +69,7 @@ uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) /* Enable requested clock (some clocks are always on) */ // All clocks on/off takes time to be stable, so we shouldn't frequently enable/disable the clock - // Only enable if orignally was disabled, and set back to the disable state after calibration is done + // Only enable if originally was disabled, and set back to the disable state after calibration is done // If the clock is already on, then do nothing bool dig_32k_xtal_enabled = clk_ll_xtal32k_digi_is_enabled(); if (cal_clk == RTC_CAL_32K_XTAL && !dig_32k_xtal_enabled) { @@ -240,9 +240,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32s2/rtc_time.c b/components/esp_hw_support/port/esp32s2/rtc_time.c index fc943d40d0..5d6df04504 100644 --- a/components/esp_hw_support/port/esp32s2/rtc_time.c +++ b/components/esp_hw_support/port/esp32s2/rtc_time.c @@ -116,7 +116,7 @@ static uint32_t rtc_clk_cal_internal_cycling(rtc_cal_sel_t cal_clk, uint32_t slo } /** - * @brief Slowclk period calculating funtion used by rtc_clk_cal and rtc_clk_cal_cycling + * @brief Slowclk period calculating function used by rtc_clk_cal and rtc_clk_cal_cycling * @param xtal_cycles number of xtal cycles count * @param slowclk_cycles number of slow clock cycles to count * @return slow clock period @@ -140,7 +140,7 @@ static uint32_t rtc_clk_xtal_to_slowclk(uint64_t xtal_cycles, uint32_t slowclk_c uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles, uint32_t cal_mode) { /* On ESP32S2, choosing RTC_CAL_RTC_MUX results in calibration of - * the 90k RTC clock regardless of the currenlty selected SLOW_CLK. + * the 90k RTC clock regardless of the currently selected SLOW_CLK. * On the ESP32, it used the currently selected SLOW_CLK. * The following code emulates ESP32 behavior: */ @@ -271,9 +271,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/esp_hw_support/port/esp32s3/rtc_time.c b/components/esp_hw_support/port/esp32s3/rtc_time.c index 212ef229f0..6a7d036ee4 100644 --- a/components/esp_hw_support/port/esp32s3/rtc_time.c +++ b/components/esp_hw_support/port/esp32s3/rtc_time.c @@ -35,7 +35,7 @@ uint32_t rtc_clk_cal_internal(rtc_cal_sel_t cal_clk, uint32_t slowclk_cycles) { /* On ESP32S3, choosing RTC_CAL_RTC_MUX results in calibration of - * the 150k RTC clock regardless of the currenlty selected SLOW_CLK. + * the 150k RTC clock regardless of the currently selected SLOW_CLK. * On the ESP32, it used the currently selected SLOW_CLK. * The following code emulates ESP32 behavior: */ @@ -205,9 +205,7 @@ static void enable_timer_group0_for_calibration(void) } } #else - // no critical section is needed for bootloader - int __DECLARE_RCC_RC_ATOMIC_ENV; - timer_ll_enable_bus_clock(0, true); - timer_ll_reset_register(0); + _timer_ll_enable_bus_clock(0, true); + _timer_ll_reset_register(0); #endif } diff --git a/components/hal/esp32/include/hal/timer_ll.h b/components/hal/esp32/include/hal/timer_ll.h index 6ab06a8dba..8fa86e6044 100644 --- a/components/hal/esp32/include/hal/timer_ll.h +++ b/components/hal/esp32/include/hal/timer_ll.h @@ -56,7 +56,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { DPORT_WRITE_PERI_REG(DPORT_PERIP_RST_EN_REG, DPORT_TIMERGROUP_RST); @@ -71,7 +71,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -166,7 +166,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32c2/include/hal/timer_ll.h b/components/hal/esp32c2/include/hal/timer_ll.h index eb6d285f11..f1a8ebaf9f 100644 --- a/components/hal/esp32c2/include/hal/timer_ll.h +++ b/components/hal/esp32c2/include/hal/timer_ll.h @@ -49,7 +49,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { (void)group_id; SYSTEM.perip_rst_en0.timergroup_rst = 1; @@ -59,7 +59,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -154,7 +154,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32c3/include/hal/timer_ll.h b/components/hal/esp32c3/include/hal/timer_ll.h index 18d2c8572f..383f550b18 100644 --- a/components/hal/esp32c3/include/hal/timer_ll.h +++ b/components/hal/esp32c3/include/hal/timer_ll.h @@ -52,7 +52,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { SYSTEM.perip_rst_en0.reg_timergroup_rst = 1; @@ -67,7 +67,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -162,7 +162,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32c5/include/hal/timer_ll.h b/components/hal/esp32c5/include/hal/timer_ll.h index eee3918b3c..40a33c070d 100644 --- a/components/hal/esp32c5/include/hal/timer_ll.h +++ b/components/hal/esp32c5/include/hal/timer_ll.h @@ -34,7 +34,7 @@ extern "C" { * @param group_id Group ID * @param enable true to enable, false to disable */ -static inline void timer_ll_enable_bus_clock(int group_id, bool enable) +static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) { if (group_id == 0) { PCR.timergroup0_conf.tg0_clk_en = enable; @@ -45,7 +45,7 @@ static inline void timer_ll_enable_bus_clock(int group_id, bool enable) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_enable_bus_clock(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_enable_bus_clock(__VA_ARGS__) +#define timer_ll_enable_bus_clock(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_enable_bus_clock(__VA_ARGS__) /** * @brief Reset the timer group module @@ -56,7 +56,7 @@ static inline void timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { PCR.timergroup0_conf.tg0_rst_en = 1; @@ -71,7 +71,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -197,7 +197,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32c6/include/hal/timer_ll.h b/components/hal/esp32c6/include/hal/timer_ll.h index 2c11f42f53..bc507a3877 100644 --- a/components/hal/esp32c6/include/hal/timer_ll.h +++ b/components/hal/esp32c6/include/hal/timer_ll.h @@ -79,7 +79,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { PCR.timergroup0_conf.tg0_rst_en = 1; @@ -94,7 +94,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -203,7 +203,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32c61/include/hal/timer_ll.h b/components/hal/esp32c61/include/hal/timer_ll.h index f1158a6b5f..bbf6502623 100644 --- a/components/hal/esp32c61/include/hal/timer_ll.h +++ b/components/hal/esp32c61/include/hal/timer_ll.h @@ -59,7 +59,7 @@ extern "C" { * @param group_id Group ID * @param enable true to enable, false to disable */ -static inline void timer_ll_enable_bus_clock(int group_id, bool enable) +static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) { if (group_id == 0) { PCR.timergroup0_conf.tg0_clk_en = enable; @@ -70,7 +70,7 @@ static inline void timer_ll_enable_bus_clock(int group_id, bool enable) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_enable_bus_clock(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_enable_bus_clock(__VA_ARGS__) +#define timer_ll_enable_bus_clock(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_enable_bus_clock(__VA_ARGS__) /** * @brief Reset the timer group module @@ -81,7 +81,7 @@ static inline void timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { PCR.timergroup0_conf.tg0_rst_en = 1; @@ -96,7 +96,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -205,7 +205,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32h2/include/hal/timer_ll.h b/components/hal/esp32h2/include/hal/timer_ll.h index b6b2b82de8..b62bdb4db8 100644 --- a/components/hal/esp32h2/include/hal/timer_ll.h +++ b/components/hal/esp32h2/include/hal/timer_ll.h @@ -79,7 +79,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { PCR.timergroup0_conf.tg0_rst_en = 1; @@ -94,7 +94,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -203,7 +203,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32p4/include/hal/timer_ll.h b/components/hal/esp32p4/include/hal/timer_ll.h index 736ec4334f..9dc5f1cef0 100644 --- a/components/hal/esp32p4/include/hal/timer_ll.h +++ b/components/hal/esp32p4/include/hal/timer_ll.h @@ -109,7 +109,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { HP_SYS_CLKRST.hp_rst_en1.reg_rst_en_timergrp0 = 1; @@ -124,7 +124,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -255,7 +255,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32s2/include/hal/timer_ll.h b/components/hal/esp32s2/include/hal/timer_ll.h index d180788854..cd79681177 100644 --- a/components/hal/esp32s2/include/hal/timer_ll.h +++ b/components/hal/esp32s2/include/hal/timer_ll.h @@ -56,7 +56,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { WRITE_PERI_REG(DPORT_PERIP_RST_EN0_REG, DPORT_TIMERGROUP_RST_M); @@ -71,7 +71,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -170,7 +170,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group diff --git a/components/hal/esp32s3/include/hal/timer_ll.h b/components/hal/esp32s3/include/hal/timer_ll.h index 1401ead9f1..3f6f861b2d 100644 --- a/components/hal/esp32s3/include/hal/timer_ll.h +++ b/components/hal/esp32s3/include/hal/timer_ll.h @@ -52,7 +52,7 @@ static inline void _timer_ll_enable_bus_clock(int group_id, bool enable) * * @param group_id Group ID */ -static inline void timer_ll_reset_register(int group_id) +static inline void _timer_ll_reset_register(int group_id) { if (group_id == 0) { SYSTEM.perip_rst_en0.timergroup_rst = 1; @@ -67,7 +67,7 @@ static inline void timer_ll_reset_register(int group_id) /// use a macro to wrap the function, force the caller to use it in a critical section /// the critical section needs to declare the __DECLARE_RCC_RC_ATOMIC_ENV variable in advance -#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; timer_ll_reset_register(__VA_ARGS__) +#define timer_ll_reset_register(...) (void)__DECLARE_RCC_RC_ATOMIC_ENV; _timer_ll_reset_register(__VA_ARGS__) /** * @brief Set clock source for timer @@ -165,7 +165,7 @@ static inline void timer_ll_set_count_direction(timg_dev_t *hw, uint32_t timer_n } /** - * @brief Enable timer, start couting + * @brief Enable timer, start counting * * @param hw Timer Group register base address * @param timer_num Timer number in the group