summaryrefslogtreecommitdiff
path: root/usrp2/firmware/lib/hal_uart.c
diff options
context:
space:
mode:
authormatt2008-12-05 00:03:29 +0000
committermatt2008-12-05 00:03:29 +0000
commit4ef65a60c4cf79a11a097cac312d86803fbbd202 (patch)
treeae4e6511b7f6e34965b2ed449058cc4bf208f1ae /usrp2/firmware/lib/hal_uart.c
parent4ffdba1a3f74aaf98b89047f1834055652586359 (diff)
downloadgnuradio-4ef65a60c4cf79a11a097cac312d86803fbbd202.tar.gz
gnuradio-4ef65a60c4cf79a11a097cac312d86803fbbd202.tar.bz2
gnuradio-4ef65a60c4cf79a11a097cac312d86803fbbd202.zip
send a char to the serial port, but don't wait if the queue is full
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10102 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'usrp2/firmware/lib/hal_uart.c')
-rw-r--r--usrp2/firmware/lib/hal_uart.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/usrp2/firmware/lib/hal_uart.c b/usrp2/firmware/lib/hal_uart.c
index f1d46fe84..75b12b432 100644
--- a/usrp2/firmware/lib/hal_uart.c
+++ b/usrp2/firmware/lib/hal_uart.c
@@ -57,6 +57,16 @@ hal_uart_putc(int ch)
u->txchar = ch;
}
+void
+hal_uart_putc_nowait(int ch)
+{
+ if (ch == '\n') // FIXME for now map \n -> \r\n
+ hal_uart_putc('\r');
+
+ if(u->txlevel) // If fifo has space
+ u->txchar = ch;
+}
+
int
hal_uart_getc(void)
{