X-Git-Url: https://git.cryptolib.org/?p=arm-crypto-lib.git;a=blobdiff_plain;f=test_src%2Fuart_i.c;h=1eb421edd6fcce62a0bb9c64c9ba07bba60f2f5f;hp=9fb5a899bb85bc656a03b1c1fb3b963e4f1ae4af;hb=a5fa5eb95b79e98e260365878fc9338ccba3fba9;hpb=1cc5630207195b3bc9d967596a9a207c1c0f6464 diff --git a/test_src/uart_i.c b/test_src/uart_i.c index 9fb5a89..1eb421e 100644 --- a/test_src/uart_i.c +++ b/test_src/uart_i.c @@ -266,3 +266,12 @@ uint32_t uart_dataavail(uint8_t uartno){ } return(HW_REG(uart_base[uartno]+UARTFR_OFFSET)&_BV(UART_RXFE))?0:1; } + + +void uart_flush(uint8_t uartno){ + if(uartno>UART_MAX){ + return; + } + while((HW_REG(uart_base[uartno]+UARTCTL_OFFSET)&_BV(UART_EOT)) == 0) + ; +}