aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-11 18:07:27 -0800
committerJosh Blum <josh@joshknows.com>2011-01-11 18:07:27 -0800
commit6c03f7e74bf7fcbfbcbc02de89aac9550097afc9 (patch)
tree4bff059da9a46625b6146c90f00419411431c210 /host
parentec2ca70abe3a1e2a13d2085e3ec3af9f44a3eeae (diff)
downloaduhd-6c03f7e74bf7fcbfbcbc02de89aac9550097afc9.tar.gz
uhd-6c03f7e74bf7fcbfbcbc02de89aac9550097afc9.tar.bz2
uhd-6c03f7e74bf7fcbfbcbc02de89aac9550097afc9.zip
uhd: use internal() to default clock configs, dont use PPS_INT, theres no such thing
Diffstat (limited to 'host')
-rw-r--r--host/lib/types/clock_config.cpp4
-rw-r--r--host/lib/usrp/usrp2/mboard_impl.cpp15
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp1
-rw-r--r--host/lib/usrp/usrp_e100/mboard_impl.cpp5
4 files changed, 7 insertions, 18 deletions
diff --git a/host/lib/types/clock_config.cpp b/host/lib/types/clock_config.cpp
index 3373b97b4..c150c5cc3 100644
--- a/host/lib/types/clock_config.cpp
+++ b/host/lib/types/clock_config.cpp
@@ -30,14 +30,14 @@ clock_config_t clock_config_t::external(void){
clock_config_t clock_config_t::internal(void){
clock_config_t clock_config;
clock_config.ref_source = clock_config_t::REF_INT;
- clock_config.pps_source = clock_config_t::PPS_INT;
+ clock_config.pps_source = clock_config_t::PPS_SMA;
clock_config.pps_polarity = clock_config_t::PPS_POS;
return clock_config;
}
clock_config_t::clock_config_t(void):
ref_source(REF_INT),
- pps_source(PPS_INT),
+ pps_source(PPS_SMA),
pps_polarity(PPS_POS)
{
/* NOP */
diff --git a/host/lib/usrp/usrp2/mboard_impl.cpp b/host/lib/usrp/usrp2/mboard_impl.cpp
index d23afe723..6a25a8870 100644
--- a/host/lib/usrp/usrp2/mboard_impl.cpp
+++ b/host/lib/usrp/usrp2/mboard_impl.cpp
@@ -142,7 +142,10 @@ usrp2_mboard_impl::usrp2_mboard_impl(
}
std::cout << boost::format("mboard%d MIMO %s") % _index %
(_mimo_clocking_mode_is_master?"master":"slave") << std::endl;
- init_clock_config();
+
+ //init the clock config
+ _clock_config = clock_config_t::internal();
+ update_clock_config();
//init the codec before the dboard
codec_init();
@@ -163,16 +166,6 @@ usrp2_mboard_impl::~usrp2_mboard_impl(void){
/***********************************************************************
* Helper Methods
**********************************************************************/
-void usrp2_mboard_impl::init_clock_config(void){
- //setup the clock configuration settings
- _clock_config.ref_source = clock_config_t::REF_INT;
- _clock_config.pps_source = clock_config_t::PPS_SMA;
- _clock_config.pps_polarity = clock_config_t::PPS_NEG;
-
- //update the clock config (sends a control packet)
- update_clock_config();
-}
-
void usrp2_mboard_impl::update_clock_config(void){
boost::uint32_t pps_flags = 0;
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 9cd27ee41..3c937327b 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -120,7 +120,6 @@ private:
//methods and shadows for clock configuration
uhd::clock_config_t _clock_config;
- void init_clock_config(void);
void update_clock_config(void);
void set_time_spec(const uhd::time_spec_t &time_spec, bool now);
diff --git a/host/lib/usrp/usrp_e100/mboard_impl.cpp b/host/lib/usrp/usrp_e100/mboard_impl.cpp
index c056bf3ea..51625ed54 100644
--- a/host/lib/usrp/usrp_e100/mboard_impl.cpp
+++ b/host/lib/usrp/usrp_e100/mboard_impl.cpp
@@ -37,10 +37,7 @@ void usrp_e100_impl::mboard_init(void){
);
//init the clock config
- _clock_config.ref_source = clock_config_t::REF_AUTO;
- _clock_config.pps_source = clock_config_t::PPS_SMA;
- _clock_config.pps_polarity = clock_config_t::PPS_NEG;
-
+ _clock_config = clock_config_t::internal();
update_clock_config();
}