arch/mips/pic32mz/pic32mz-lowconsole.c: Wait for transfer complete.

Wait for the transfer to complete when using up_lowputc.
This commit is contained in:
Ouss4 2020-01-31 00:52:38 +00:00 committed by Gregory Nutt
parent 701b6897d7
commit 73bdb433bb

View File

@ -493,5 +493,8 @@ void up_lowputc(char ch)
pic32mz_putreg(PIC32MZ_CONSOLE_BASE, PIC32MZ_UART_TXREG_OFFSET,
(uint32_t)ch);
while ((pic32mz_getreg(PIC32MZ_CONSOLE_BASE, PIC32MZ_UART_STA_OFFSET) &
UART_STA_UTRMT) == 0);
#endif
}