refactor(rcc): unify the usage of clock control macros for peripherals

- Removed conditional definitions for various RCC_ATOMIC macros across
multiple files, replacing them with a unified PERIPH_RCC_ATOMIC() macro.
- Updated instances where specific RCC_ATOMIC macros were used to ensure
consistent usage of PERIPH_RCC_ATOMIC().
- Deleted unused uart_share_hw_ctrl.h file as its functionality is now
integrated into the new structure.
This commit is contained in:
morris
2026-01-23 18:28:13 +08:00
parent 6640b5a2de
commit 0469db2f83
77 changed files with 212 additions and 551 deletions
+2 -8
View File
@@ -29,12 +29,6 @@ ESP_LOG_ATTR_TAG(TAG_TSENS, "temperature_sensor");
#define INT_NOT_USED 999999
#if !SOC_RCC_IS_INDEPENDENT
#define TSENS_RCC_ATOMIC() PERIPH_RCC_ATOMIC()
#else
#define TSENS_RCC_ATOMIC()
#endif
#define TSENS_LINE_REGRESSION_US (200)
static int s_temperature_sensor_power_cnt;
@@ -51,7 +45,7 @@ void temperature_sensor_power_acquire(void)
#if !SOC_TSENS_IS_INDEPENDENT_FROM_ADC
adc_apb_periph_claim();
#endif
TSENS_RCC_ATOMIC() {
PERIPH_RCC_ATOMIC() {
temperature_sensor_ll_bus_clk_enable(true);
temperature_sensor_ll_reset_module();
}
@@ -74,7 +68,7 @@ void temperature_sensor_power_release(void)
abort();
} else if (s_temperature_sensor_power_cnt == 0) {
temperature_sensor_ll_enable(false);
TSENS_RCC_ATOMIC() {
PERIPH_RCC_ATOMIC() {
temperature_sensor_ll_bus_clk_enable(false);
}
#if !SOC_TSENS_IS_INDEPENDENT_FROM_ADC