diff options
author | Nick Foster <nick@nerdnetworks.org> | 2010-12-30 18:09:54 -0800 |
---|---|---|
committer | Nick Foster <nick@nerdnetworks.org> | 2010-12-30 18:09:54 -0800 |
commit | 4ac4f25aba479a21e73539eb29b56951247c2e8a (patch) | |
tree | 60dbc2ed3944f025afaeac02e6be15aa6b35eaef /host/lib/usrp | |
parent | 805ba0352e8a96dbf56c016d6b4406995328dd66 (diff) | |
download | uhd-4ac4f25aba479a21e73539eb29b56951247c2e8a.tar.gz uhd-4ac4f25aba479a21e73539eb29b56951247c2e8a.tar.bz2 uhd-4ac4f25aba479a21e73539eb29b56951247c2e8a.zip |
USRP1: Fix ATR for TX/full duplex
Diffstat (limited to 'host/lib/usrp')
-rw-r--r-- | host/lib/usrp/usrp1/dboard_iface.cpp | 46 |
1 files changed, 31 insertions, 15 deletions
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp index 70ce3da76..c2c971269 100644 --- a/host/lib/usrp/usrp1/dboard_iface.cpp +++ b/host/lib/usrp/usrp1/dboard_iface.cpp @@ -267,22 +267,38 @@ void usrp1_dboard_iface::_set_atr_reg(unit_t unit, atr_reg_t atr, boost::uint16_t value) { // Ignore unsupported states - if ((atr == ATR_REG_IDLE) || (atr == ATR_REG_FULL_DUPLEX)) + if ((atr == ATR_REG_IDLE)) return; - - switch(unit) { - case UNIT_RX: - if (_dboard_slot == usrp1_impl::DBOARD_SLOT_A) - _iface->poke32(FR_ATR_RXVAL_1, value); - else if (_dboard_slot == usrp1_impl::DBOARD_SLOT_B) - _iface->poke32(FR_ATR_RXVAL_3, value); - break; - case UNIT_TX: - if (_dboard_slot == usrp1_impl::DBOARD_SLOT_A) - _iface->poke32(FR_ATR_TXVAL_0, value); - else if (_dboard_slot == usrp1_impl::DBOARD_SLOT_B) - _iface->poke32(FR_ATR_TXVAL_2, value); - break; + if(atr == ATR_REG_RX_ONLY) { + switch(unit) { + case UNIT_RX: + if (_dboard_slot == usrp1_impl::DBOARD_SLOT_A) + _iface->poke32(FR_ATR_RXVAL_1, value); + else if (_dboard_slot == usrp1_impl::DBOARD_SLOT_B) + _iface->poke32(FR_ATR_RXVAL_3, value); + break; + case UNIT_TX: + if (_dboard_slot == usrp1_impl::DBOARD_SLOT_A) + _iface->poke32(FR_ATR_RXVAL_0, value); + else if (_dboard_slot == usrp1_impl::DBOARD_SLOT_B) + _iface->poke32(FR_ATR_RXVAL_2, value); + break; + } + } else if (atr == ATR_REG_TX_ONLY && atr == ATR_REG_FULL_DUPLEX) { + switch(unit) { + case UNIT_RX: + if (_dboard_slot == usrp1_impl::DBOARD_SLOT_A) + _iface->poke32(FR_ATR_TXVAL_1, value); + else if (_dboard_slot == usrp1_impl::DBOARD_SLOT_B) + _iface->poke32(FR_ATR_TXVAL_3, value); + break; + case UNIT_TX: + if (_dboard_slot == usrp1_impl::DBOARD_SLOT_A) + _iface->poke32(FR_ATR_TXVAL_0, value); + else if (_dboard_slot == usrp1_impl::DBOARD_SLOT_B) + _iface->poke32(FR_ATR_TXVAL_2, value); + break; + } } } /*********************************************************************** |