diff options
author | Josh Blum <josh@joshknows.com> | 2011-04-26 12:48:50 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-04-26 14:15:16 -0700 |
commit | 7450a6583f37d7d61b9a4463000d18d4f11fa21e (patch) | |
tree | 9007e65b4343113a3ba9f4ddd0bfbef38f57f807 /host/lib/usrp/usrp1 | |
parent | 40feb62b3dbe638a80f9b19f21d2c696263f268b (diff) | |
download | uhd-7450a6583f37d7d61b9a4463000d18d4f11fa21e.tar.gz uhd-7450a6583f37d7d61b9a4463000d18d4f11fa21e.tar.bz2 uhd-7450a6583f37d7d61b9a4463000d18d4f11fa21e.zip |
usrp: support for grand daughter board eeprom
Diffstat (limited to 'host/lib/usrp/usrp1')
-rw-r--r-- | host/lib/usrp/usrp1/dboard_impl.cpp | 12 | ||||
-rw-r--r-- | host/lib/usrp/usrp1/usrp1_impl.hpp | 2 |
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; |