aboutsummaryrefslogtreecommitdiff
path: root/kernel/uart.c
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2011-07-07 14:57:30 +0000
committerDimitri Sokolyuk <demon@dim13.org>2011-07-07 14:57:30 +0000
commite3d72e74e85c27dbb1b80fd577c305759cc717c1 (patch)
tree1ec46675be348cab5c86dfb9c4c5cea42fe49d78 /kernel/uart.c
parent647a3d05d3f2e25f7853d9435cbfea107f98dec0 (diff)
switch to macro
Diffstat (limited to 'kernel/uart.c')
-rw-r--r--kernel/uart.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/kernel/uart.c b/kernel/uart.c
index a952758..cdfaf73 100644
--- a/kernel/uart.c
+++ b/kernel/uart.c
@@ -45,16 +45,16 @@ uart_getchar(void)
{
char c;
-#if BLOCKING
+#if 0 /* BLOCKING */
loop_until_bit_is_set(UCSRA, RXC);
#else
if (bit_is_clear(UCSRA, RXC))
return 0;
#endif
- if (UCSRA & _BV(FE))
+ if (bit_is_set(UCSRA, FE))
return -2; /* EOF */
- if (UCSRA & _BV(DOR))
+ if (bit_is_set(UCSRA, DOR))
return -1; /* ERR */
c = UDR;