aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1/dboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-04-30 17:11:46 -0700
committerJosh Blum <josh@joshknows.com>2011-04-30 17:11:46 -0700
commit493ed897f24fff5265b766ee634916b002cadf94 (patch)
tree09082fa8be0c71b92ca668083dd1519a452b679d /host/lib/usrp/usrp1/dboard_impl.cpp
parent7b509d6fe4ac4cfcafc63f11f5b298d3e0237acd (diff)
parent1e57d1c0496ca6263652cd84c9eeacafde833915 (diff)
downloaduhd-493ed897f24fff5265b766ee634916b002cadf94.tar.gz
uhd-493ed897f24fff5265b766ee634916b002cadf94.tar.bz2
uhd-493ed897f24fff5265b766ee634916b002cadf94.zip
Merge branch 'master' into next
Conflicts: host/lib/usrp/usrp2/usrp2_regs.cpp
Diffstat (limited to 'host/lib/usrp/usrp1/dboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp1/dboard_impl.cpp12
1 files changed, 11 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp1/dboard_impl.cpp b/host/lib/usrp/usrp1/dboard_impl.cpp
index 02906fc45..df0bb6261 100644
--- a/host/lib/usrp/usrp1/dboard_impl.cpp
+++ b/host/lib/usrp/usrp1/dboard_impl.cpp
@@ -59,6 +59,7 @@ void usrp1_impl::dboard_init(void)
//read the tx and rx dboard eeproms
_rx_db_eeproms[dboard_slot].load(*_iface, get_rx_ee_addr(dboard_slot));
_tx_db_eeproms[dboard_slot].load(*_iface, get_tx_ee_addr(dboard_slot));
+ _gdb_eeproms[dboard_slot].load(*_iface, get_tx_ee_addr(dboard_slot) ^ 5);
//create a new dboard interface and manager
_dboard_ifaces[dboard_slot] = make_dboard_iface(
@@ -68,7 +69,7 @@ void usrp1_impl::dboard_init(void)
_dboard_managers[dboard_slot] = dboard_manager::make(
_rx_db_eeproms[dboard_slot].id,
- _tx_db_eeproms[dboard_slot].id,
+ ((_gdb_eeproms[dboard_slot].id == dboard_id_t::none())? _tx_db_eeproms[dboard_slot] : _gdb_eeproms[dboard_slot]).id,
_dboard_ifaces[dboard_slot]
);
@@ -171,6 +172,10 @@ void usrp1_impl::tx_dboard_get(const wax::obj &key_, wax::obj &val, dboard_slot_
val = _tx_db_eeproms[dboard_slot];
return;
+ case DBOARD_PROP_GBOARD_EEPROM:
+ val = _gdb_eeproms[dboard_slot];
+ return;
+
case DBOARD_PROP_DBOARD_IFACE:
val = _dboard_ifaces[dboard_slot];
return;
@@ -203,6 +208,11 @@ void usrp1_impl::tx_dboard_set(const wax::obj &key, const wax::obj &val, dboard_
_tx_db_eeproms[dboard_slot].store(*_iface, get_tx_ee_addr(dboard_slot));
return;
+ case DBOARD_PROP_GBOARD_EEPROM:
+ _gdb_eeproms[dboard_slot] = val.as<dboard_eeprom_t>();
+ _gdb_eeproms[dboard_slot].store(*_iface, get_tx_ee_addr(dboard_slot) ^ 5);
+ return;
+
default: UHD_THROW_PROP_SET_ERROR();
}
}