aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-04 16:49:34 -0800
committerJosh Blum <josh@joshknows.com>2011-01-04 16:49:34 -0800
commitfabfa8d9dd6670afb9c621b9ee12f8d602d7ccda (patch)
tree107e43e35008e6df0d33b0e8a8f5f52d28a91493 /host/lib/usrp/usrp2/mboard_impl.cpp
parent4711829f03ee2fcd1c4e9dc2a353af0e35497180 (diff)
parent7b0b2924d52bbbcb4660cad5d8070074426011ce (diff)
downloaduhd-fabfa8d9dd6670afb9c621b9ee12f8d602d7ccda.tar.gz
uhd-fabfa8d9dd6670afb9c621b9ee12f8d602d7ccda.tar.bz2
uhd-fabfa8d9dd6670afb9c621b9ee12f8d602d7ccda.zip
Merge branch 'cordic_policy' into next
Conflicts: host/lib/usrp/usrp2/usrp2_regs.cpp host/lib/usrp/usrp2/usrp2_regs.hpp
Diffstat (limited to 'host/lib/usrp/usrp2/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp24
1 files changed, 15 insertions, 9 deletions
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index 4dcc45fd3..9ca47cdc3 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -330,15 +330,21 @@ void usrp2_mboard_impl::get(const wax::obj &key_, wax::obj &val){
val = _clock_config;
return;
- case MBOARD_PROP_TIME_NOW:{
- usrp2_iface::pair64 time64(
- _iface->peek64(_iface->regs.time64_secs_rb, _iface->regs.time64_ticks_rb)
- );
- val = time_spec_t(
- time64.first, time64.second, get_master_clock_freq()
- );
- }
+ case MBOARD_PROP_TIME_NOW: while(true){
+ uint32_t secs = _iface->peek32(_iface->regs.time64_secs_rb_imm);
+ uint32_t ticks = _iface->peek32(_iface->regs.time64_ticks_rb_imm);
+ if (secs != _iface->peek32(_iface->regs.time64_secs_rb_imm)) continue;
+ val = time_spec_t(secs, ticks, get_master_clock_freq());
return;
+ }
+
+ case MBOARD_PROP_TIME_PPS: while(true){
+ uint32_t secs = _iface->peek32(_iface->regs.time64_secs_rb_pps);
+ uint32_t ticks = _iface->peek32(_iface->regs.time64_ticks_rb_pps);
+ if (secs != _iface->peek32(_iface->regs.time64_secs_rb_pps)) continue;
+ val = time_spec_t(secs, ticks, get_master_clock_freq());
+ return;
+ }
case MBOARD_PROP_RX_SUBDEV_SPEC:
val = _rx_subdev_spec;
@@ -372,7 +378,7 @@ void usrp2_mboard_impl::set(const wax::obj &key, const wax::obj &val){
set_time_spec(val.as<time_spec_t>(), true);
return;
- case MBOARD_PROP_TIME_NEXT_PPS:
+ case MBOARD_PROP_TIME_PPS:
set_time_spec(val.as<time_spec_t>(), false);
return;