Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b0e5afe

Browse files
committed
Merge branch 'bugfix/uart_cannot_write_completely' into 'master'
fix: fix uart write data incomplete See merge request sdk/ESP8266_RTOS_SDK!1276
2 parents bf8786c + ae51c20 commit b0e5afe

File tree

1 file changed

+5
-1
lines changed
  • components/esp8266/driver

1 file changed

+5
-1
lines changed

components/esp8266/driver/uart.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -590,7 +590,11 @@ static void uart_rx_intr_handler_default(void *param)
590590
}
591591

592592
if (p_uart->tx_len_tot == 0) {
593-
en_tx_flg = false;
593+
if (tx_fifo_rem == 0) {
594+
en_tx_flg = true;
595+
} else{
596+
en_tx_flg = false;
597+
}
594598
xSemaphoreGiveFromISR(p_uart->tx_done_sem, &task_woken);
595599
if (task_woken == pdTRUE) {
596600
portYIELD_FROM_ISR();

0 commit comments

Comments
 (0)