aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-09-09 13:39:52 -0700
committerJosh Blum <josh@joshknows.com>2011-09-28 10:32:05 -0700
commit25494489bf8b7c60875ea355d29323bcfffd604b (patch)
treebbb533238db6fc24d807670c2adf23d59de9160a /host/lib/usrp/usrp2/usrp2_impl.cpp
parent18a3f03c06c65d79e5c4b7ac1076077c4b9fd8ff (diff)
downloaduhd-25494489bf8b7c60875ea355d29323bcfffd604b.tar.gz
uhd-25494489bf8b7c60875ea355d29323bcfffd604b.tar.bz2
uhd-25494489bf8b7c60875ea355d29323bcfffd604b.zip
usrp2: uart/udp work in host and fw, working
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index 03a9d09fe..47aec08d5 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -438,10 +438,9 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
// create gpsdo control objects
////////////////////////////////////////////////////////////////
if (_mbc[mb].iface->mb_eeprom["gpsdo"] == "internal"){
- _mbc[mb].gps = gps_ctrl::make(
- _mbc[mb].iface->get_gps_write_fn(),
- _mbc[mb].iface->get_gps_read_fn()
- );
+ _mbc[mb].gps = gps_ctrl::make(udp_simple::make_uart(udp_simple::make_connected(
+ addr, BOOST_STRINGIZE(USRP2_UDP_UART_GPS_PORT)
+ )));
if(_mbc[mb].gps->gps_detected()) {
BOOST_FOREACH(const std::string &name, _mbc[mb].gps->get_sensors()){
_tree->create<sensor_value_t>(mb_path / "sensors" / name)
@@ -624,8 +623,10 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
//GPS installed: use external ref, time, and init time spec
if (_mbc[mb].gps.get() and _mbc[mb].gps->gps_detected()){
+ UHD_MSG(status) << "Setting references to the internal GPSDO" << std::endl;
_tree->access<std::string>(root / "time_source/value").set("external");
_tree->access<std::string>(root / "clock_source/value").set("external");
+ UHD_MSG(status) << "Initializing time to the internal GPSDO" << std::endl;
_mbc[mb].time64->set_time_next_pps(time_spec_t(time_t(_mbc[mb].gps->get_sensor("gps_time").to_int()+1)));
}
}