aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_iface.cpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2011-01-17 22:51:14 -0800
committerNick Foster <nick@nerdnetworks.org>2011-01-17 22:51:14 -0800
commit330a014dfc32b34a7fe5555d3ae2d87a25dc2466 (patch)
tree5b744b8cdb13eda776028a046cf4e15dba0a668d /host/lib/usrp/usrp2/usrp2_iface.cpp
parentcaa911aa270ee4aef7244f3159b9fd402a454069 (diff)
downloaduhd-330a014dfc32b34a7fe5555d3ae2d87a25dc2466.tar.gz
uhd-330a014dfc32b34a7fe5555d3ae2d87a25dc2466.tar.bz2
uhd-330a014dfc32b34a7fe5555d3ae2d87a25dc2466.zip
next: generalized the GPS interface to any USRP device. just give it a function to write/read strings to UART.
not sure if i'm happy with the interface; maybe inheriting is cleaner. this works though. gps interface for usrp2 is disabled right now in mboard_impl.
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.cpp b/host/lib/usrp/usrp2/usrp2_iface.cpp
index dcb25dc54..149c5011f 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.cpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.cpp
@@ -218,6 +218,14 @@ public:
}
return result;
}
+
+ gps_send_fn_t get_gps_write_fn(void) {
+ return boost::bind(&usrp2_iface_impl::write_uart, this, 2, _1); //2 is the GPS UART port on USRP2
+ }
+
+ gps_recv_fn_t get_gps_read_fn(void) {
+ return boost::bind(&usrp2_iface_impl::read_uart, this, 2); //2 is the GPS UART port on USRP2
+ }
/***********************************************************************
* Send/Recv over control