aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-03 17:57:39 -0700
committerJosh Blum <josh@joshknows.com>2010-08-03 17:57:39 -0700
commit1301d665d621358ec6eccb41a020a4689cb0b566 (patch)
tree3de38f2df931e75c1b07d6c54aab25a65a1cac5e /host/lib
parenta47e75c84099081a7f7b2a13e11c3615bed22a5c (diff)
downloaduhd-1301d665d621358ec6eccb41a020a4689cb0b566.tar.gz
uhd-1301d665d621358ec6eccb41a020a4689cb0b566.tar.bz2
uhd-1301d665d621358ec6eccb41a020a4689cb0b566.zip
usrp-e: fixed clock div calculation bug
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp_e/clock_ctrl.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp_e/clock_ctrl.cpp b/host/lib/usrp/usrp_e/clock_ctrl.cpp
index df649cee6..8a5bd1c6b 100644
--- a/host/lib/usrp/usrp_e/clock_ctrl.cpp
+++ b/host/lib/usrp/usrp_e/clock_ctrl.cpp
@@ -164,7 +164,7 @@ public:
void set_rx_dboard_clock_rate(double rate){
assert_has(get_rx_dboard_clock_rates(), rate, "rx dboard clock rate");
- size_t divider = size_t(rate/master_clock_rate);
+ size_t divider = size_t(master_clock_rate/rate);
//set the divider registers
set_clock_divider(divider,
_ad9522_regs.divider3_low_cycles,
@@ -194,7 +194,7 @@ public:
void set_tx_dboard_clock_rate(double rate){
assert_has(get_tx_dboard_clock_rates(), rate, "tx dboard clock rate");
- size_t divider = size_t(rate/master_clock_rate);
+ size_t divider = size_t(master_clock_rate/rate);
//set the divider registers
set_clock_divider(divider,
_ad9522_regs.divider2_low_cycles,