From 1301d665d621358ec6eccb41a020a4689cb0b566 Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Tue, 3 Aug 2010 17:57:39 -0700 Subject: usrp-e: fixed clock div calculation bug --- host/lib/usrp/usrp_e/clock_ctrl.cpp | 4 ++-- 1 file 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, -- cgit v1.2.3