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/usrp_e100 | |
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/usrp_e100')
-rw-r--r-- | host/lib/usrp/usrp_e100/dboard_impl.cpp | 15 | ||||
-rw-r--r-- | host/lib/usrp/usrp_e100/usrp_e100_impl.hpp | 2 |
2 files changed, 15 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp_e100/dboard_impl.cpp b/host/lib/usrp/usrp_e100/dboard_impl.cpp index 0b89fed9f..f6bbbd5e8 100644 --- a/host/lib/usrp/usrp_e100/dboard_impl.cpp +++ b/host/lib/usrp/usrp_e100/dboard_impl.cpp @@ -31,15 +31,19 @@ using namespace uhd::usrp; * Dboard Initialization **********************************************************************/ void usrp_e100_impl::dboard_init(void){ + //read the dboard eeprom to extract the dboard ids _rx_db_eeprom.load(*_iface, I2C_ADDR_RX_DB); _tx_db_eeprom.load(*_iface, I2C_ADDR_TX_DB); + _gdb_eeprom.load(*_iface, I2C_ADDR_TX_DB ^ 5); //create a new dboard interface and manager _dboard_iface = make_usrp_e100_dboard_iface( _iface, _clock_ctrl, _codec_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 ); //setup the dboard proxies @@ -136,6 +140,10 @@ void usrp_e100_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; @@ -167,6 +175,11 @@ void usrp_e100_impl::tx_dboard_set(const wax::obj &key, const wax::obj &val){ _tx_db_eeprom.store(*_iface, I2C_ADDR_TX_DB); return; + case DBOARD_PROP_GBOARD_EEPROM: + _gdb_eeprom = val.as<dboard_eeprom_t>(); + _gdb_eeprom.store(*_iface, I2C_ADDR_TX_DB ^ 5); + return; + default: UHD_THROW_PROP_SET_ERROR(); } } diff --git a/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp b/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp index 98117cf26..737aa4e8f 100644 --- a/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp +++ b/host/lib/usrp/usrp_e100/usrp_e100_impl.hpp @@ -132,7 +132,7 @@ private: wax_obj_proxy::sptr _rx_dboard_proxy; //tx dboard functions and settings - uhd::usrp::dboard_eeprom_t _tx_db_eeprom; + uhd::usrp::dboard_eeprom_t _tx_db_eeprom, _gdb_eeprom; 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; |