diff options
author | Josh Blum <josh@joshknows.com> | 2012-05-18 11:50:32 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2012-05-18 11:50:32 -0700 |
commit | a5ffda85bc0c0606caa20a43a0b3d317ea778233 (patch) | |
tree | 7ab29781815c5589246ea0c7723b90c9e70c03bf /host/lib/usrp/cores | |
parent | 3804361215babcebb2a814cf29a315c5f5f3fd2f (diff) | |
download | uhd-a5ffda85bc0c0606caa20a43a0b3d317ea778233.tar.gz uhd-a5ffda85bc0c0606caa20a43a0b3d317ea778233.tar.bz2 uhd-a5ffda85bc0c0606caa20a43a0b3d317ea778233.zip |
gpsdo: added "gpsdo" clock and time source options
When an on-board GPSDO is detected, "gpsdo" is added to the options.
Diffstat (limited to 'host/lib/usrp/cores')
-rw-r--r-- | host/lib/usrp/cores/time64_core_200.cpp | 6 | ||||
-rw-r--r-- | host/lib/usrp/cores/time64_core_200.hpp | 4 |
2 files changed, 8 insertions, 2 deletions
diff --git a/host/lib/usrp/cores/time64_core_200.cpp b/host/lib/usrp/cores/time64_core_200.cpp index e460d1106..11b310362 100644 --- a/host/lib/usrp/cores/time64_core_200.cpp +++ b/host/lib/usrp/cores/time64_core_200.cpp @@ -56,6 +56,10 @@ public: if (_mimo_delay_cycles != 0) _sources.push_back("mimo"); } + void enable_gpsdo(void){ + _sources.push_back("gpsdo"); + } + void set_tick_rate(const double rate){ _tick_rate = rate; } @@ -100,7 +104,7 @@ public: assert_has(_sources, source, "time source"); //setup pps flags - if (source == "external"){ + if (source == "external" or source == "gpsdo"){ _iface->poke32(REG_TIME64_FLAGS, FLAG_TIME64_PPS_SMA | FLAG_TIME64_PPS_POSEDGE); } else if (source == "_external_"){ diff --git a/host/lib/usrp/cores/time64_core_200.hpp b/host/lib/usrp/cores/time64_core_200.hpp index 7571573a5..315f2ba67 100644 --- a/host/lib/usrp/cores/time64_core_200.hpp +++ b/host/lib/usrp/cores/time64_core_200.hpp @@ -1,5 +1,5 @@ // -// Copyright 2011 Ettus Research LLC +// Copyright 2011-2012 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -42,6 +42,8 @@ public: const size_t mimo_delay_cycles = 0 // 0 means no-mimo ); + virtual void enable_gpsdo(void) = 0; + virtual void set_tick_rate(const double rate) = 0; virtual uhd::time_spec_t get_time_now(void) = 0; |