aboutsummaryrefslogtreecommitdiffstats
path: root/host/examples
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-05-01 17:26:15 -0700
committerJosh Blum <josh@joshknows.com>2011-05-01 17:26:15 -0700
commit5c6c179689ef76ccd25d09ac4faeb9a836a066c8 (patch)
tree28c23bb2ec6c70abbe9d5c18d77902d822cf56d2 /host/examples
parent4b18ab84921a88f0448632355e8165ecaff4ed6f (diff)
downloaduhd-5c6c179689ef76ccd25d09ac4faeb9a836a066c8.tar.gz
uhd-5c6c179689ef76ccd25d09ac4faeb9a836a066c8.tar.bz2
uhd-5c6c179689ef76ccd25d09ac4faeb9a836a066c8.zip
usrp-e100: add ability to set/get default master clock rate from EEPROM
Mboard eeprom map class can parse the setting (4 byte float). The clock control will try to set the eeprom rate if present, otherwise or under failure condition, it sets the default. Updated docs, example, and provided helpful verbose. I would prefer that users burn the desired rate to the eeprom (and they may too).
Diffstat (limited to 'host/examples')
-rw-r--r--host/examples/rx_timed_samples.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/host/examples/rx_timed_samples.cpp b/host/examples/rx_timed_samples.cpp
index 28d7ee466..05cc0717b 100644
--- a/host/examples/rx_timed_samples.cpp
+++ b/host/examples/rx_timed_samples.cpp
@@ -32,7 +32,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
std::string args;
double seconds_in_future;
size_t total_num_samps;
- double rate, clock;
+ double rate;
//setup the program options
po::options_description desc("Allowed options");
@@ -41,7 +41,6 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("args", po::value<std::string>(&args)->default_value(""), "single uhd device address args")
("secs", po::value<double>(&seconds_in_future)->default_value(1.5), "number of seconds in the future to receive")
("nsamps", po::value<size_t>(&total_num_samps)->default_value(10000), "total number of samples to receive")
- ("clock", po::value<double>(&clock), "master clock frequency in Hz")
("rate", po::value<double>(&rate)->default_value(100e6/16), "rate of incoming samples")
("dilv", "specify to disable inner-loop verbose")
;
@@ -63,12 +62,6 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
uhd::usrp::multi_usrp::sptr usrp = uhd::usrp::multi_usrp::make(args);
std::cout << boost::format("Using Device: %s") % usrp->get_pp_string() << std::endl;
- //optionally set the clock rate (do before setting anything else)
- if (vm.count("clock")){
- std::cout << boost::format("Setting master clock rate: %f MHz...") % (clock/1e6) << std::endl;
- usrp->set_master_clock_rate(clock);
- }
-
//set the rx sample rate
std::cout << boost::format("Setting RX Rate: %f Msps...") % (rate/1e6) << std::endl;
usrp->set_rx_rate(rate);