Skip to content

Commit 84260dc

Browse files
authored
Write loop could lead to wdt with low bitrates or large buffers. Fixes #7746 (#7799)
1 parent a3a7a23 commit 84260dc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

cores/esp8266/uart.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -506,8 +506,10 @@ uart_write(uart_t* uart, const char* buf, size_t size)
506506

507507
size_t ret = size;
508508
const int uart_nr = uart->uart_nr;
509-
while (size--)
509+
while (size--) {
510510
uart_do_write_char(uart_nr, pgm_read_byte(buf++));
511+
optimistic_yield(10000UL);
512+
}
511513

512514
return ret;
513515
}

0 commit comments

Comments
 (0)