aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-26 17:54:41 -0700
committerJosh Blum <josh@joshknows.com>2011-04-26 17:54:41 -0700
commit3ff2780a82eed3bbca8f6a9f52f31746de42ea40 (patch)
treef11a4056ccdba38ea1cc342ee5e265307c50851b /host/lib/usrp/usrp2
parent190d7cd9d5206113fad22111107034cb52c3c28b (diff)
parent1a81e2a35ff1d288e87eb1e65911c1a97588217c (diff)
downloaduhd-3ff2780a82eed3bbca8f6a9f52f31746de42ea40.tar.gz
uhd-3ff2780a82eed3bbca8f6a9f52f31746de42ea40.tar.bz2
uhd-3ff2780a82eed3bbca8f6a9f52f31746de42ea40.zip
Merge branch 'gdb_support'
Conflicts: host/lib/usrp/dboard/CMakeLists.txt
Diffstat (limited to 'host/lib/usrp/usrp2')
-rw-r--r--host/lib/usrp/usrp2/dboard_impl.cpp14
-rw-r--r--host/lib/usrp/usrp2/usrp2_impl.hpp2
2 files changed, 14 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp2/dboard_impl.cpp b/host/lib/usrp/usrp2/dboard_impl.cpp
index 3f41cddcf..8c6379d66 100644
--- a/host/lib/usrp/usrp2/dboard_impl.cpp
+++ b/host/lib/usrp/usrp2/dboard_impl.cpp
@@ -38,11 +38,14 @@ void usrp2_mboard_impl::dboard_init(void){
//read the dboard eeprom to extract the dboard ids
_rx_db_eeprom.load(*_iface, USRP2_I2C_ADDR_RX_DB);
_tx_db_eeprom.load(*_iface, USRP2_I2C_ADDR_TX_DB);
+ _gdb_eeprom.load(*_iface, USRP2_I2C_ADDR_TX_DB ^ 5);
//create a new dboard interface and manager
_dboard_iface = make_usrp2_dboard_iface(_iface, _clock_ctrl);
_dboard_manager = dboard_manager::make(
- _rx_db_eeprom.id, _tx_db_eeprom.id, _dboard_iface
+ _rx_db_eeprom.id,
+ ((_gdb_eeprom.id == dboard_id_t::none())? _tx_db_eeprom : _gdb_eeprom).id,
+ _dboard_iface
);
//load dboards
@@ -137,6 +140,10 @@ void usrp2_mboard_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val){
val = _tx_db_eeprom;
return;
+ case DBOARD_PROP_GBOARD_EEPROM:
+ val = _gdb_eeprom;
+ return;
+
case DBOARD_PROP_DBOARD_IFACE:
val = _dboard_iface;
return;
@@ -166,6 +173,11 @@ void usrp2_mboard_impl::tx_dboard_set(const wax::obj &key, const wax::obj &val){
_tx_db_eeprom.store(*_iface, USRP2_I2C_ADDR_TX_DB);
return;
+ case DBOARD_PROP_GBOARD_EEPROM:
+ _gdb_eeprom = val.as<dboard_eeprom_t>();
+ _gdb_eeprom.store(*_iface, USRP2_I2C_ADDR_TX_DB ^ 5);
+ return;
+
default: UHD_THROW_PROP_SET_ERROR();
}
}
diff --git a/host/lib/usrp/usrp2/usrp2_impl.hpp b/host/lib/usrp/usrp2/usrp2_impl.hpp
index 0676cecf2..e9ff22b13 100644
--- a/host/lib/usrp/usrp2/usrp2_impl.hpp
+++ b/host/lib/usrp/usrp2/usrp2_impl.hpp
@@ -147,7 +147,7 @@ private:
void tx_dboard_get(const wax::obj &, wax::obj &);
void tx_dboard_set(const wax::obj &, const wax::obj &);
wax_obj_proxy::sptr _tx_dboard_proxy;
- uhd::usrp::dboard_eeprom_t _tx_db_eeprom;
+ uhd::usrp::dboard_eeprom_t _tx_db_eeprom, _gdb_eeprom;
//methods and shadows for the dsps
UHD_PIMPL_DECL(dsp_impl) _dsp_impl;