diff options
author | Josh Blum <josh@joshknows.com> | 2010-06-05 00:24:16 +0000 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-06-05 00:24:16 +0000 |
commit | a5cdd7a311edcb3afdc9673bd7f6ec84bf8e7b6c (patch) | |
tree | 7e93babea262e9c3e807c0d45c43e400a22a4cfd /host/lib/usrp/usrp_e/mboard_impl.cpp | |
parent | a5dca07971587e3b20e57924227c020f13bfd700 (diff) | |
download | uhd-a5cdd7a311edcb3afdc9673bd7f6ec84bf8e7b6c.tar.gz uhd-a5cdd7a311edcb3afdc9673bd7f6ec84bf8e7b6c.tar.bz2 uhd-a5cdd7a311edcb3afdc9673bd7f6ec84bf8e7b6c.zip |
usrp-e more implementation, rx timed samples runs w/o error (no workie though)
Diffstat (limited to 'host/lib/usrp/usrp_e/mboard_impl.cpp')
-rw-r--r-- | host/lib/usrp/usrp_e/mboard_impl.cpp | 23 |
1 files changed, 15 insertions, 8 deletions
diff --git a/host/lib/usrp/usrp_e/mboard_impl.cpp b/host/lib/usrp/usrp_e/mboard_impl.cpp index efbde38ce..e4a0e81af 100644 --- a/host/lib/usrp/usrp_e/mboard_impl.cpp +++ b/host/lib/usrp/usrp_e/mboard_impl.cpp @@ -16,6 +16,7 @@ // #include "usrp_e_impl.hpp" +#include "usrp_e_regs.hpp" #include <uhd/utils/assert.hpp> #include <uhd/usrp/mboard_props.hpp> #include <boost/bind.hpp> @@ -75,26 +76,22 @@ void usrp_e_impl::mboard_get(const wax::obj &key_, wax::obj &val){ val = prop_names_t(1, ""); //vector of size 1 with empty string return; - case MBOARD_PROP_STREAM_CMD: - //val = TODO - return; - case MBOARD_PROP_RX_DSP: - UHD_ASSERT_THROW(name == "ddc0"); + UHD_ASSERT_THROW(name == ""); val = _rx_ddc_proxy->get_link(); return; case MBOARD_PROP_RX_DSP_NAMES: - val = prop_names_t(1, "ddc0"); + val = prop_names_t(1, ""); return; case MBOARD_PROP_TX_DSP: - UHD_ASSERT_THROW(name == "duc0"); + UHD_ASSERT_THROW(name == ""); val = _tx_duc_proxy->get_link(); return; case MBOARD_PROP_TX_DSP_NAMES: - val = prop_names_t(1, "duc0"); + val = prop_names_t(1, ""); return; case MBOARD_PROP_CLOCK_CONFIG: @@ -116,6 +113,16 @@ void usrp_e_impl::mboard_set(const wax::obj &key, const wax::obj &val){ issue_stream_cmd(val.as<stream_cmd_t>()); return; + case MBOARD_PROP_TIME_NOW: + case MBOARD_PROP_TIME_NEXT_PPS:{ + time_spec_t time_spec = val.as<time_spec_t>(); + _iface->poke32(UE_REG_TIME64_TICKS, time_spec.get_ticks(MASTER_CLOCK_RATE)); + boost::uint32_t imm_flags = (key.as<mboard_prop_t>() == MBOARD_PROP_TIME_NOW)? 1 : 0; + _iface->poke32(UE_REG_TIME64_IMM, imm_flags); + _iface->poke32(UE_REG_TIME64_SECS, time_spec.secs); + } + return; + default: UHD_THROW_PROP_SET_ERROR(); } } |