esp_rom_output_tx_wait_idle() function
Wait for UART TX FIFO is empty and all data has been sent out.
Syntax
void esp_rom_output_tx_wait_idle(uint8_t serial_num); Arguments
serial_num
The serial number defined in ROM, including UART_x, USB_OTG, USB_SERIAL_JTAG..