mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-12-03 08:22:44 +00:00
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
69f5220b21
commit
7ea1357336
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157940
@ -53,10 +53,10 @@ getc(int seconds)
|
|||||||
thisSecond = GetSeconds();
|
thisSecond = GetSeconds();
|
||||||
seconds = thisSecond + seconds;
|
seconds = thisSecond + seconds;
|
||||||
|
|
||||||
while (thisSecond <= seconds) {
|
do {
|
||||||
if ((pUSART->US_CSR & AT91C_US_RXRDY))
|
if ((pUSART->US_CSR & AT91C_US_RXRDY))
|
||||||
return (pUSART->US_RHR & 0xFF);
|
return (pUSART->US_RHR & 0xFF);
|
||||||
thisSecond = GetSeconds();
|
thisSecond = GetSeconds();
|
||||||
}
|
} while (thisSecond < seconds);
|
||||||
return (-1);
|
return (-1);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user