Commit 91f17638 authored by Tomasz Wlostowski's avatar Tomasz Wlostowski

uart.c: added RX functions

parent fcf2f2ef
...@@ -21,3 +21,13 @@ void uart_write_byte(unsigned char x) ...@@ -21,3 +21,13 @@ void uart_write_byte(unsigned char x)
if(x == '\n') if(x == '\n')
uart_write_byte('\r'); uart_write_byte('\r');
} }
int uart_poll()
{
return uart->SR & UART_SR_RX_RDY;
}
int uart_read_byte()
{
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