mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-08 04:02:27 +00:00
esp_rom: extract common uart apis into esp_rom_uart.h
This commit is contained in:
@@ -26,11 +26,7 @@
|
||||
#include "driver/uart.h"
|
||||
#include "sdkconfig.h"
|
||||
#include "driver/uart_select.h"
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
#include "esp32/rom/uart.h"
|
||||
#elif CONFIG_IDF_TARGET_ESP32S2
|
||||
#include "esp32s2/rom/uart.h"
|
||||
#endif
|
||||
#include "esp_rom_uart.h"
|
||||
|
||||
// TODO: make the number of UARTs chip dependent
|
||||
#define UART_NUM SOC_UART_NUM
|
||||
@@ -352,7 +348,7 @@ static int uart_fsync(int fd)
|
||||
{
|
||||
assert(fd >= 0 && fd < 3);
|
||||
_lock_acquire_recursive(&s_ctx[fd]->write_lock);
|
||||
uart_tx_wait_idle((uint8_t) fd);
|
||||
esp_rom_uart_tx_wait_idle((uint8_t) fd);
|
||||
_lock_release_recursive(&s_ctx[fd]->write_lock);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user