mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 03:00:34 +03:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user