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/apps/txrx_uhd.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/apps/txrx_uhd.c')
-rw-r--r-- | firmware/microblaze/apps/txrx_uhd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/firmware/microblaze/apps/txrx_uhd.c b/firmware/microblaze/apps/txrx_uhd.c index 2065830ff..9fe17e262 100644 --- a/firmware/microblaze/apps/txrx_uhd.c +++ b/firmware/microblaze/apps/txrx_uhd.c @@ -324,6 +324,9 @@ void handle_udp_ctrl_packet( case USRP2_CTRL_ID_HEY_WRITE_THIS_UART_FOR_ME_BRO:{ int num_bytes = ctrl_data_in->data.uart_args.bytes; if(num_bytes > 20) num_bytes = 20; + //before we write to the UART, we flush the receive buffer + //this assumes that we're interested in the reply + hal_uart_rx_flush(ctrl_data_in->data.uart_args.dev); fnputstr(ctrl_data_in->data.uart_args.dev, (char *) ctrl_data_in->data.uart_args.data, num_bytes); ctrl_data_out.id = USRP2_CTRL_ID_MAN_I_TOTALLY_WROTE_THAT_UART_DUDE; ctrl_data_out.data.uart_args.bytes = num_bytes; |