diff options
Diffstat (limited to 'sys/boot/arm/at91/libat91/getc.c')
-rw-r--r-- | sys/boot/arm/at91/libat91/getc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/boot/arm/at91/libat91/getc.c b/sys/boot/arm/at91/libat91/getc.c index c86183b..e0a43b9 100644 --- a/sys/boot/arm/at91/libat91/getc.c +++ b/sys/boot/arm/at91/libat91/getc.c @@ -53,10 +53,10 @@ getc(int seconds) thisSecond = GetSeconds(); seconds = thisSecond + seconds; - while (thisSecond <= seconds) { + do { if ((pUSART->US_CSR & AT91C_US_RXRDY)) return (pUSART->US_RHR & 0xFF); thisSecond = GetSeconds(); - } + } while (thisSecond < seconds); return (-1); } |