/* uart_lowlevel.c */
/*
- This file is part of the AVR-Crypto-Lib.
+ This file is part of the ARM-Crypto-Lib.
Copyright (C) 2010 Daniel Otte (daniel.otte@rub.de)
This program is free software: you can redistribute it and/or modify
/* wait while the FIFO is empty */
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)
+ ;
+}