mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +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:
@@ -15,7 +15,6 @@
|
||||
#include "esp_system.h"
|
||||
#include "soc/uart_struct.h"
|
||||
#include "esp_private/periph_ctrl.h"
|
||||
#include "esp_private/uart_share_hw_ctrl.h"
|
||||
#include "esp_rom_gpio.h"
|
||||
#include "hal/gpio_types.h"
|
||||
#include "hal/uart_ll.h"
|
||||
@@ -680,7 +679,7 @@ static void uart_aut_baud_det_init(int rxd_io_num)
|
||||
gpio_set_direction(rxd_io_num, GPIO_MODE_INPUT_OUTPUT);
|
||||
esp_rom_gpio_connect_out_signal(rxd_io_num, i2c_periph_signal[0].scl_out_sig, 0, 0);
|
||||
esp_rom_gpio_connect_in_signal(rxd_io_num, UART_PERIPH_SIGNAL(1, SOC_UART_PERIPH_SIGNAL_RX), 0);
|
||||
HP_UART_BUS_CLK_ATOMIC() {
|
||||
PERIPH_RCC_ATOMIC() {
|
||||
uart_ll_enable_bus_clock(1, true);
|
||||
uart_ll_reset_register(1);
|
||||
}
|
||||
@@ -715,7 +714,7 @@ static void i2c_scl_freq_cal(void)
|
||||
|
||||
printf("\nSCL high period %.3f (us), SCL low_period %.3f (us)\n\n", (float)(i2c_cource_clk_period * high_period_cnt), (float)(i2c_cource_clk_period * low_period_cnt));
|
||||
uart_ll_set_autobaud_en(&UART1, false);
|
||||
HP_UART_BUS_CLK_ATOMIC() {
|
||||
PERIPH_RCC_ATOMIC() {
|
||||
uart_ll_enable_bus_clock(1, false);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user