Make getc(0) polling (this has the happy side effect of saving
	8 bytes in the generated code).
This commit is contained in:
Warner Losh 2006-04-21 13:58:51 +00:00
parent 69f5220b21
commit 7ea1357336
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=157940

View File

@ -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);
}