MFp4:
Make getc(0) polling (this has the happy side effect of saving 8 bytes in the generated code).
This commit is contained in:
parent
67b9c508f8
commit
12209e78be
@ -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);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user