diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 11:34:07 -0700 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-08-13 11:34:07 -0700 |
commit | f09d9820ed40371f552d3a910bc2d8170d290653 (patch) | |
tree | d0a2d1b5d807aea51717be881cbfd27fbd45fe20 /firmware/microblaze/lib/hal_uart.c | |
parent | 3fe2744e7aef9f6989b161be3af63a24392ed18a (diff) | |
download | uhd-f09d9820ed40371f552d3a910bc2d8170d290653.tar.gz uhd-f09d9820ed40371f552d3a910bc2d8170d290653.tar.bz2 uhd-f09d9820ed40371f552d3a910bc2d8170d290653.zip |
first stab at a GPS driver in gps_ctrl.cpp. not the most expandable thing in the world but there's only so many GPS interfaces out there.
Diffstat (limited to 'firmware/microblaze/lib/hal_uart.c')
-rw-r--r-- | firmware/microblaze/lib/hal_uart.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/firmware/microblaze/lib/hal_uart.c b/firmware/microblaze/lib/hal_uart.c index a8344daf5..8f7f83a68 100644 --- a/firmware/microblaze/lib/hal_uart.c +++ b/firmware/microblaze/lib/hal_uart.c @@ -101,3 +101,10 @@ hal_uart_getc(hal_uart_name_t u) return uart_regs[u].rxchar; } +int hal_uart_rx_flush(hal_uart_name_t u) +{ + char x; + while(uart_regs[u].rxlevel) x = uart_regs[u].rxchar; + return x; +} + |