diff options
Diffstat (limited to 'usrp/host/lib')
-rw-r--r-- | usrp/host/lib/db_flexrf.cc | 98 | ||||
-rw-r--r-- | usrp/host/lib/usrp_dbid.dat | 3 |
2 files changed, 101 insertions, 0 deletions
diff --git a/usrp/host/lib/db_flexrf.cc b/usrp/host/lib/db_flexrf.cc index 07ac2be3b..2819c19bd 100644 --- a/usrp/host/lib/db_flexrf.cc +++ b/usrp/host/lib/db_flexrf.cc @@ -639,6 +639,38 @@ _AD4360_common::_prescaler() //---------------------------------------------------------------------- +_2200_common::_2200_common() + : _AD4360_common() +{ + // Band-specific R-Register Values + d_R_DIV = 16; // bits 15:2 + + // Band-specific C-Register values + d_P = 1; // bits 23,22 Div by 16/17 + d_CP2 = 7; // bits 19:17 + d_CP1 = 7; // bits 16:14 + + // Band specifc N-Register Values + d_DIVSEL = 0; // bit 23 + d_DIV2 = 0; // bit 22 + d_CPGAIN = 0; // bit 21 + d_freq_mult = 1; +} + +double +_2200_common::freq_min() +{ + return 2000e6; +} + +double +_2200_common::freq_max() +{ + return 2400e6; +} + +//---------------------------------------------------------------------- + _2400_common::_2400_common() : _AD4360_common() { @@ -811,6 +843,72 @@ _400_rx::_400_rx() //------------------------------------------------------------ +db_flexrf_2200_tx::db_flexrf_2200_tx(usrp_basic_sptr usrp, int which) + : flexrf_base_tx(usrp, which) +{ + d_common = new _2200_common(); +} + +db_flexrf_2200_tx::~db_flexrf_2200_tx() +{ +} + +bool +db_flexrf_2200_tx::_compute_regs(double freq, int &retR, int &retcontrol, + int &retN, double &retfreq) +{ + return d_common->_compute_regs(_refclk_freq(), freq, retR, + retcontrol, retN, retfreq); +} + + + +db_flexrf_2200_rx::db_flexrf_2200_rx(usrp_basic_sptr usrp, int which) + : flexrf_base_rx(usrp, which) +{ + d_common = new _2200_common(); + set_gain((gain_min() + gain_max()) / 2.0); // initialize gain +} + +db_flexrf_2200_rx::~db_flexrf_2200_rx() +{ +} + +float +db_flexrf_2200_rx::gain_min() +{ + return usrp()->pga_min(); +} + +float +db_flexrf_2200_rx::gain_max() +{ + return usrp()->pga_max()+70; +} + +float +db_flexrf_2200_rx::gain_db_per_step() +{ + return 0.05; +} + + +bool +db_flexrf_2200_rx::i_and_q_swapped() +{ + return true; +} + +bool +db_flexrf_2200_rx::_compute_regs(double freq, int &retR, int &retcontrol, + int &retN, double &retfreq) +{ + return d_common->_compute_regs(_refclk_freq(), freq, retR, + retcontrol, retN, retfreq); +} + +//------------------------------------------------------------ + db_flexrf_2400_tx::db_flexrf_2400_tx(usrp_basic_sptr usrp, int which) : flexrf_base_tx(usrp, which) { diff --git a/usrp/host/lib/usrp_dbid.dat b/usrp/host/lib/usrp_dbid.dat index 5193a5fa0..2548d737e 100644 --- a/usrp/host/lib/usrp_dbid.dat +++ b/usrp/host/lib/usrp_dbid.dat @@ -61,6 +61,9 @@ "Flex 1200 Tx MIMO B" 0x002a "Flex 2400 Tx MIMO B" 0x002b +"Flex 2200 Rx MIMO B" 0x002c +"Flex 2200 Tx MIMO B" 0x002d + "Flex 1800 Rx" 0x0030 "Flex 1800 Tx" 0x0031 "Flex 1800 Rx MIMO A" 0x0032 |