aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-01-04 16:50:18 -0800
committerJosh Blum <josh@joshknows.com>2011-01-04 16:50:18 -0800
commit78085d3c101e0dbaf95393904c8c06ca5279cc42 (patch)
tree10372369d97f5c7baef0c35c2dd1558444ed8496 /host/lib/usrp
parentfabfa8d9dd6670afb9c621b9ee12f8d602d7ccda (diff)
parentdf11c4d378ebe11ba4864d5a28559b8cb4af98c4 (diff)
downloaduhd-78085d3c101e0dbaf95393904c8c06ca5279cc42.tar.gz
uhd-78085d3c101e0dbaf95393904c8c06ca5279cc42.tar.bz2
uhd-78085d3c101e0dbaf95393904c8c06ca5279cc42.zip
Merge branch 'buffer_pool' into next
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/dboard/db_xcvr2450.cpp3
-rw-r--r--host/lib/usrp/usrp1/dboard_iface.cpp46
2 files changed, 33 insertions, 16 deletions
diff --git a/host/lib/usrp/dboard/db_xcvr2450.cpp b/host/lib/usrp/dboard/db_xcvr2450.cpp
index a3a1e6242..e76727bec 100644
--- a/host/lib/usrp/dboard/db_xcvr2450.cpp
+++ b/host/lib/usrp/dboard/db_xcvr2450.cpp
@@ -245,7 +245,8 @@ void xcvr2450::update_atr(void){
int band_sel = (xcvr2450::is_highband(_lo_freq))? HB_PA_TXIO : LB_PA_TXIO;
int tx_ant_sel = (_tx_ant == "J1")? ANTSEL_TX1_RX2_TXIO : ANTSEL_TX2_RX1_TXIO;
int rx_ant_sel = (_rx_ant == "J2")? ANTSEL_TX1_RX2_TXIO : ANTSEL_TX2_RX1_TXIO;
- int xx_ant_sel = tx_ant_sel; //prefer the tx antenna selection for full duplex (rx will get the other antenna)
+ int xx_ant_sel = tx_ant_sel; //Prefer the tx antenna selection for full duplex,
+ //due to the issue that USRP1 will take the value of full duplex for its TXATR.
int ad9515div = (_ad9515div == 3)? AD9515DIV_3_TXIO : AD9515DIV_2_TXIO;
//set the tx registers
diff --git a/host/lib/usrp/usrp1/dboard_iface.cpp b/host/lib/usrp/usrp1/dboard_iface.cpp
index 70ce3da76..4e47d6bf6 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) || (atr == ATR_REG_TX_ONLY))
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_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;
+ }
}
}
/***********************************************************************