summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp1
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/usrp1
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/usrp1')
-rw-r--r--host/lib/usrp/usrp1/dboard_impl.cpp12
-rw-r--r--host/lib/usrp/usrp1/usrp1_impl.hpp2
2 files changed, 12 insertions, 2 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();
}
}
diff --git a/host/lib/usrp/usrp1/usrp1_impl.hpp b/host/lib/usrp/usrp1/usrp1_impl.hpp
index 9755c466d..f53894b29 100644
--- a/host/lib/usrp/usrp1/usrp1_impl.hpp
+++ b/host/lib/usrp/usrp1/usrp1_impl.hpp
@@ -175,7 +175,7 @@ private:
uhd::dict<dboard_slot_t, wax_obj_proxy::sptr> _rx_dboard_proxies;
//tx dboard functions and settings
- uhd::dict<dboard_slot_t, uhd::usrp::dboard_eeprom_t> _tx_db_eeproms;
+ uhd::dict<dboard_slot_t, uhd::usrp::dboard_eeprom_t> _tx_db_eeproms, _gdb_eeproms;
void tx_dboard_get(const wax::obj &, wax::obj &, dboard_slot_t);
void tx_dboard_set(const wax::obj &, const wax::obj &, dboard_slot_t);
uhd::dict<dboard_slot_t, wax_obj_proxy::sptr> _tx_dboard_proxies;