aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/cores
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-08-13 10:56:22 -0700
committerJosh Blum <josh@joshknows.com>2013-08-13 10:56:22 -0700
commit77f360afdad3af71d125ca375a00221ad231792e (patch)
treef8c8ce6751871eeb06aee787c0d5f77ebc6dd4b9 /host/lib/usrp/cores
parent9f1d6bdc501e04aa205f88ed5ef95e38c1bec03b (diff)
downloaduhd-77f360afdad3af71d125ca375a00221ad231792e.tar.gz
uhd-77f360afdad3af71d125ca375a00221ad231792e.tar.bz2
uhd-77f360afdad3af71d125ca375a00221ad231792e.zip
b200: changed for pps select register
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r--host/lib/usrp/cores/time_core_3000.cpp24
-rw-r--r--host/lib/usrp/cores/time_core_3000.hpp6
2 files changed, 3 insertions, 27 deletions
diff --git a/host/lib/usrp/cores/time_core_3000.cpp b/host/lib/usrp/cores/time_core_3000.cpp
index 8b5ad927a..45ff55271 100644
--- a/host/lib/usrp/cores/time_core_3000.cpp
+++ b/host/lib/usrp/cores/time_core_3000.cpp
@@ -24,9 +24,8 @@
#define REG_TIME_LO _base + 4
#define REG_TIME_CTRL _base + 8
-#define CTRL_LATCH_TIME_PPS (1 << 2)
-#define CTRL_LATCH_TIME_NOW (1 << 1)
-#define CTRL_SELECT_EXT_PPS (1 << 0)
+#define CTRL_LATCH_TIME_PPS (1 << 1)
+#define CTRL_LATCH_TIME_NOW (1 << 0)
using namespace uhd;
@@ -41,7 +40,6 @@ struct time_core_3000_impl : time_core_3000
_readback_bases(readback_bases)
{
this->set_tick_rate(1); //init to non zero
- this->set_time_source("internal");
}
~time_core_3000_impl(void)
@@ -102,29 +100,13 @@ struct time_core_3000_impl : time_core_3000
const boost::uint64_t ticks = time.to_ticks(_tick_rate);
_iface->poke32(REG_TIME_HI, boost::uint32_t(ticks >> 32));
_iface->poke32(REG_TIME_LO, boost::uint32_t(ticks >> 0));
- _iface->poke32(REG_TIME_CTRL, (_use_ext_pps?CTRL_SELECT_EXT_PPS:0) | CTRL_LATCH_TIME_PPS);
- }
-
- void set_time_source(const std::string &source)
- {
- if (source == "internal") _use_ext_pps = false;
- else if (source == "external") _use_ext_pps = true;
- else throw uhd::runtime_error("time_core_3000: set_time_source unknown source: " + source);
- }
-
- std::vector<std::string> get_time_sources(void)
- {
- std::vector<std::string> sources;
- sources.push_back("internal");
- sources.push_back("external");
- return sources;
+ _iface->poke32(REG_TIME_CTRL, CTRL_LATCH_TIME_PPS);
}
wb_iface::sptr _iface;
const size_t _base;
const readback_bases_type _readback_bases;
double _tick_rate;
- bool _use_ext_pps;
};
time_core_3000::sptr time_core_3000::make(
diff --git a/host/lib/usrp/cores/time_core_3000.hpp b/host/lib/usrp/cores/time_core_3000.hpp
index f2b684ccf..ffe2f4133 100644
--- a/host/lib/usrp/cores/time_core_3000.hpp
+++ b/host/lib/usrp/cores/time_core_3000.hpp
@@ -23,8 +23,6 @@
#include <boost/utility.hpp>
#include <boost/shared_ptr.hpp>
#include "wb_iface.hpp"
-#include <string>
-#include <vector>
class time_core_3000 : boost::noncopyable
{
@@ -55,10 +53,6 @@ public:
virtual void set_time_next_pps(const uhd::time_spec_t &time) = 0;
- virtual void set_time_source(const std::string &source) = 0;
-
- virtual std::vector<std::string> get_time_sources(void) = 0;
-
};
#endif /* INCLUDED_LIBUHD_USRP_TIME_CORE_3000_HPP */