We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5311589 commit 524b80bCopy full SHA for 524b80b
boot/espressif/port/esp32/serial_adapter.c
@@ -68,12 +68,18 @@ static uart_dev_t *serial_boot_uart_dev = (SERIAL_BOOT_UART_NUM == 0) ?
68
void console_write(const char *str, int cnt)
69
{
70
uint32_t tx_len;
71
+ uint32_t write_len;
72
73
do {
74
tx_len = uart_ll_get_txfifo_len(serial_boot_uart_dev);
- } while (tx_len < cnt);
75
-
76
- uart_ll_write_txfifo(serial_boot_uart_dev, (const uint8_t *)str, cnt);
+ if (tx_len > 0) {
+ write_len = tx_len < cnt ? tx_len : cnt;
77
+ uart_ll_write_txfifo(serial_boot_uart_dev, (const uint8_t *)str, write_len);
78
+ cnt -= write_len;
79
+ }
80
+ MCUBOOT_WATCHDOG_FEED();
81
+ esp_rom_delay_us(1000);
82
+ } while (cnt > 0);
83
}
84
85
int console_read(char *str, int cnt, int *newline)
0 commit comments