summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-07-01 22:16:34 -0700
committerJosh Blum <josh@joshknows.com>2011-07-01 22:16:34 -0700
commit0e3240ec5680fff7597d209b795dd0bc603f9919 (patch)
tree9c281aeff34cbd096d1f7320151260d4284f9fde
parentea309eba1b34371e710a01ad9bfd26a88311c267 (diff)
downloaduhd-0e3240ec5680fff7597d209b795dd0bc603f9919.tar.gz
uhd-0e3240ec5680fff7597d209b795dd0bc603f9919.tar.bz2
uhd-0e3240ec5680fff7597d209b795dd0bc603f9919.zip
usrp: renamed sma source option to external
-rw-r--r--host/lib/usrp/b100/b100_impl.cpp4
-rw-r--r--host/lib/usrp/cores/time64_core_200.cpp8
-rw-r--r--host/lib/usrp/e100/e100_impl.cpp4
-rw-r--r--host/lib/usrp/multi_usrp.cpp6
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.cpp18
5 files changed, 20 insertions, 20 deletions
diff --git a/host/lib/usrp/b100/b100_impl.cpp b/host/lib/usrp/b100/b100_impl.cpp
index d1048d4c8..93e26f047 100644
--- a/host/lib/usrp/b100/b100_impl.cpp
+++ b/host/lib/usrp/b100/b100_impl.cpp
@@ -330,7 +330,7 @@ b100_impl::b100_impl(const device_addr_t &device_addr){
//setup reference source props
_tree->create<std::string>(mb_path / "ref_source/value")
.subscribe(boost::bind(&b100_impl::update_ref_source, this, _1));
- static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("sma")("auto");
+ static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("external")("auto");
_tree->create<std::vector<std::string> >(mb_path / "ref_source/options").set(ref_sources);
////////////////////////////////////////////////////////////////////
@@ -447,7 +447,7 @@ void b100_impl::set_db_eeprom(const std::string &type, const uhd::usrp::dboard_e
void b100_impl::update_ref_source(const std::string &source){
if (source == "auto") _clock_ctrl->use_auto_ref();
else if (source == "internal") _clock_ctrl->use_internal_ref();
- else if (source == "sma") _clock_ctrl->use_external_ref();
+ else if (source == "external") _clock_ctrl->use_external_ref();
else throw uhd::runtime_error("unhandled clock configuration reference source: " + source);
}
diff --git a/host/lib/usrp/cores/time64_core_200.cpp b/host/lib/usrp/cores/time64_core_200.cpp
index 1edfef8a1..23d1bdea2 100644
--- a/host/lib/usrp/cores/time64_core_200.cpp
+++ b/host/lib/usrp/cores/time64_core_200.cpp
@@ -52,8 +52,8 @@ public:
_mimo_delay_cycles(mimo_delay_cycles)
{
_sources.push_back("none");
- _sources.push_back("sma");
- _sources.push_back("_sma_");
+ _sources.push_back("external");
+ _sources.push_back("_external_");
if (_mimo_delay_cycles != 0) _sources.push_back("mimo");
}
@@ -98,10 +98,10 @@ public:
assert_has(_sources, source, "time source");
//setup pps flags
- if (source == "sma"){
+ if (source == "external"){
_iface->poke32(REG_TIME64_FLAGS, FLAG_TIME64_PPS_SMA | FLAG_TIME64_PPS_POSEDGE);
}
- else if (source == "_sma_"){
+ else if (source == "_external_"){
_iface->poke32(REG_TIME64_FLAGS, FLAG_TIME64_PPS_SMA | FLAG_TIME64_PPS_NEGEDGE);
}
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp
index 248ad52d2..518443435 100644
--- a/host/lib/usrp/e100/e100_impl.cpp
+++ b/host/lib/usrp/e100/e100_impl.cpp
@@ -289,7 +289,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
//setup reference source props
_tree->create<std::string>(mb_path / "ref_source/value")
.subscribe(boost::bind(&e100_impl::update_ref_source, this, _1));
- static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("sma")("auto");
+ static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("external")("auto");
_tree->create<std::vector<std::string> >(mb_path / "ref_source/options").set(ref_sources);
////////////////////////////////////////////////////////////////////
@@ -383,6 +383,6 @@ void e100_impl::set_db_eeprom(const std::string &type, const uhd::usrp::dboard_e
void e100_impl::update_ref_source(const std::string &source){
if (source == "auto") _clock_ctrl->use_auto_ref();
else if (source == "internal") _clock_ctrl->use_internal_ref();
- else if (source == "sma") _clock_ctrl->use_external_ref();
+ else if (source == "external") _clock_ctrl->use_external_ref();
else throw uhd::runtime_error("unhandled clock configuration reference source: " + source);
}
diff --git a/host/lib/usrp/multi_usrp.cpp b/host/lib/usrp/multi_usrp.cpp
index b62fc8b7f..06c965e2c 100644
--- a/host/lib/usrp/multi_usrp.cpp
+++ b/host/lib/usrp/multi_usrp.cpp
@@ -350,18 +350,18 @@ public:
std::string ref_source;
switch(clock_config.ref_source){
case clock_config_t::REF_INT: ref_source = "internal"; break;
- case clock_config_t::PPS_SMA: ref_source = "sma"; break;
+ case clock_config_t::PPS_SMA: ref_source = "external"; break;
case clock_config_t::PPS_MIMO: ref_source = "mimo"; break;
default: ref_source = "unknown";
}
- if (ref_source == "sma" and clock_config.pps_polarity == clock_config_t::PPS_NEG) ref_source = "_sma_";
+ if (ref_source == "external" and clock_config.pps_polarity == clock_config_t::PPS_NEG) ref_source = "_external_";
_tree->access<std::string>(mb_root(mboard) / "ref_source" / "value").set(ref_source);
//set the time source
std::string time_source;
switch(clock_config.pps_source){
case clock_config_t::PPS_INT: time_source = "internal"; break;
- case clock_config_t::PPS_SMA: time_source = "sma"; break;
+ case clock_config_t::PPS_SMA: time_source = "external"; break;
case clock_config_t::PPS_MIMO: time_source = "mimo"; break;
default: time_source = "unknown";
}
diff --git a/host/lib/usrp/usrp2/usrp2_impl.cpp b/host/lib/usrp/usrp2/usrp2_impl.cpp
index b2092f415..129470b59 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.cpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.cpp
@@ -495,7 +495,7 @@ usrp2_impl::usrp2_impl(const device_addr_t &_device_addr){
//setup reference source props
_tree->create<std::string>(mb_path / "ref_source/value")
.subscribe(boost::bind(&usrp2_impl::update_ref_source, this, mb, _1));
- static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("sma")("mimo");
+ static const std::vector<std::string> ref_sources = boost::assign::list_of("internal")("external")("mimo");
_tree->create<std::vector<std::string> >(mb_path / "ref_source/options").set(ref_sources);
////////////////////////////////////////////////////////////////
@@ -564,8 +564,8 @@ 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() != NULL){
- _tree->access<std::string>(root / "time_source/value").set("sma");
- _tree->access<std::string>(root / "ref_source/value").set("sma");
+ _tree->access<std::string>(root / "time_source/value").set("external");
+ _tree->access<std::string>(root / "ref_source/value").set("external");
_mbc[mb].time64->set_time_next_pps(time_spec_t(time_t(_mbc[mb].gps->get_sensor("gps_time").to_int()+1)));
}
}
@@ -631,18 +631,18 @@ void usrp2_impl::update_ref_source(const std::string &mb, const std::string &sou
case usrp2_iface::USRP_N210:
case usrp2_iface::USRP_N200_R4:
case usrp2_iface::USRP_N210_R4:
- if (source == "internal") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x12);
- else if (source == "sma") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x1C);
- else if (source == "mimo") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x15);
+ if (source == "internal") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x12);
+ else if (source == "external") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x1C);
+ else if (source == "mimo") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x15);
else throw uhd::value_error("unhandled clock configuration reference source: " + source);
_mbc[mb].clock->enable_external_ref(true); //USRP2P has an internal 10MHz TCXO
break;
case usrp2_iface::USRP2_REV3:
case usrp2_iface::USRP2_REV4:
- if (source == "internal") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x10);
- else if (source == "sma") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x1C);
- else if (source == "mimo") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x15);
+ if (source == "internal") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x10);
+ else if (source == "external") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x1C);
+ else if (source == "mimo") _mbc[mb].iface->poke32(U2_REG_MISC_CTRL_CLOCK, 0x15);
else throw uhd::value_error("unhandled clock configuration reference source: " + source);
_mbc[mb].clock->enable_external_ref(source != "internal");
break;