Commit e189da53 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski Committed by Grzegorz Daniluk

dev/uart.c: now uart_read_byte() checks if there is data to be received

parent 5c4e478d
...@@ -38,5 +38,8 @@ int uart_poll() ...@@ -38,5 +38,8 @@ int uart_poll()
int uart_read_byte() int uart_read_byte()
{ {
return uart ->RDR & 0xff; if(!uart_poll())
return -1;
return uart->RDR & 0xff;
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment