diff options
author | Jason Abele | 2009-11-06 17:40:16 -0800 |
---|---|---|
committer | Jason Abele | 2010-01-04 11:20:47 -0800 |
commit | 5a85f2708ce664469611b5263ac9da5f0b7b50fc (patch) | |
tree | 4eb226cd50a154fa1ea92647b8c4b2bdd6b51100 | |
parent | 829344242b60b155eed7451367ff4245d9b28999 (diff) | |
download | gnuradio-5a85f2708ce664469611b5263ac9da5f0b7b50fc.tar.gz gnuradio-5a85f2708ce664469611b5263ac9da5f0b7b50fc.tar.bz2 gnuradio-5a85f2708ce664469611b5263ac9da5f0b7b50fc.zip |
Fixing bad tuning range code
-rw-r--r-- | usrp/host/lib/db_wbxng_adf4350.cc | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/usrp/host/lib/db_wbxng_adf4350.cc b/usrp/host/lib/db_wbxng_adf4350.cc index 237760845..c17e8d670 100644 --- a/usrp/host/lib/db_wbxng_adf4350.cc +++ b/usrp/host/lib/db_wbxng_adf4350.cc @@ -28,16 +28,14 @@ #define FREQ_C(freq) uint64_t(freq) #define INPUT_REF_FREQ FREQ_C(64e6) -#define DIV_ROUND(num, denom) FREQ_C((double(num) + (double(denom)/2))/double(denom)) +#define DIV_ROUND(num, denom) (((num) + ((denom)/2))/(denom)) #define INPUT_REF_FREQ_2X (2*INPUT_REF_FREQ) /* input ref freq with doubler turned on */ #define MIN_INT_DIV uint16_t(23) /* minimum int divider, prescaler 4/5 only */ #define MAX_RF_DIV uint8_t(16) /* max rf divider, divides rf output */ #define MIN_VCO_FREQ FREQ_C(2.2e9) /* minimum vco freq */ #define MAX_VCO_FREQ FREQ_C(4.4e9) /* minimum vco freq */ -//#define MAX_FREQ DIV_ROUND(MAX_VCO_FREQ, 1) /* upper bound freq (rf div = 1) */ -#define MAX_FREQ FREQ_C(2.3e9) -//#define MIN_FREQ DIV_ROUND(MIN_VCO_FREQ, MAX_RF_DIV) /* calculated lower bound freq */ -#define MIN_FREQ FREQ_C(60e6) +#define MAX_FREQ DIV_ROUND(MAX_VCO_FREQ, 1) /* upper bound freq (rf div = 1) */ +#define MIN_FREQ DIV_ROUND(MIN_VCO_FREQ, MAX_RF_DIV) /* calculated lower bound freq */ #define CE_PIN (1 << 3) #define PDB_RF_PIN (1 << 2) |