aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-05 19:12:01 -0700
committerJosh Blum <josh@joshknows.com>2010-07-05 19:12:01 -0700
commita95eaac42f6cc85fd2ad3f32dc29eeab38ef5194 (patch)
treebc1a60e25496a3a1c3ff26f0fc2d3782b6ab191d /host/lib/usrp/usrp2/mboard_impl.cpp
parentc2039a8c92561fa5532d87cb9d875a3ad7b875c1 (diff)
downloaduhd-a95eaac42f6cc85fd2ad3f32dc29eeab38ef5194.tar.gz
uhd-a95eaac42f6cc85fd2ad3f32dc29eeab38ef5194.tar.bz2
uhd-a95eaac42f6cc85fd2ad3f32dc29eeab38ef5194.zip
usrp2: Added a peek64 to read pairs of 32 bit numbers such as time64
also added a templated host to/from network conversion in byteswap.hpp (didnt use it though)
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 36ac6275f..952954286 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -256,12 +256,14 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
val = _clock_config;
return;
- case MBOARD_PROP_TIME_NOW:
- val = time_spec_t(
- _iface->peek32(U2_REG_TIME64_SECS_RB),
- _iface->peek32(U2_REG_TIME64_TICKS_RB),
- get_master_clock_freq()
- );
+ case MBOARD_PROP_TIME_NOW:{
+ usrp2_iface::pair64 time64(
+ _iface->peek64(U2_REG_TIME64_SECS_RB, U2_REG_TIME64_TICKS_RB)
+ );
+ val = time_spec_t(
+ time64.first, time64.second, get_master_clock_freq()
+ );
+ }
return;
default: UHD_THROW_PROP_GET_ERROR();