From 83dde40090e0bbd91c304602cc0e3c365f7878bb Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Tue, 26 Sep 2017 18:22:25 -0700 Subject: uhd: Changed mboard_eeprom_t interface, refactored MB EEPROM code - uhd::usrp::mboard_eeprom_t is now simply a map. Its commit() method has no utility being a public API call, because the user never gets access to the appropriate I2C object (Minor API breakage) - The central mboard_eeprom.cpp file was broken up and put into many smaller compilation units in every device's implementation folder. - Renamed some of the constants (e.g. B000_* -> USRP1_*, N100_* -> N200_*) - Removed the N000_* EEPROM code, because, well, you know, there's no such device --- host/lib/usrp/b200/b200_impl.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) (limited to 'host/lib/usrp/b200/b200_impl.cpp') diff --git a/host/lib/usrp/b200/b200_impl.cpp b/host/lib/usrp/b200/b200_impl.cpp index a513e1336..134cba208 100644 --- a/host/lib/usrp/b200/b200_impl.cpp +++ b/host/lib/usrp/b200/b200_impl.cpp @@ -220,7 +220,7 @@ static device_addrs_t b200_find(const device_addr_t &hint) catch(const uhd::exception &){continue;} //ignore claimed b200_iface::sptr iface = b200_iface::make(control); - const mboard_eeprom_t mb_eeprom = mboard_eeprom_t(*iface, "B200"); + const mboard_eeprom_t mb_eeprom = b200_impl::get_mb_eeprom(iface); device_addr_t new_addr; new_addr["type"] = "b200"; @@ -362,7 +362,7 @@ b200_impl::b200_impl(const uhd::device_addr_t& device_addr, usb_device_handle::s //////////////////////////////////////////////////////////////////// // setup the mboard eeprom //////////////////////////////////////////////////////////////////// - const mboard_eeprom_t mb_eeprom(*_iface, "B200"); + const mboard_eeprom_t mb_eeprom = get_mb_eeprom(_iface); _tree->create(mb_path / "eeprom") .set(mb_eeprom) .add_coerced_subscriber(boost::bind(&b200_impl::set_mb_eeprom, this, _1)); @@ -983,11 +983,6 @@ void b200_impl::check_fpga_compat(void) % compat_major % compat_minor)); } -void b200_impl::set_mb_eeprom(const uhd::usrp::mboard_eeprom_t &mb_eeprom) -{ - mb_eeprom.commit(*_iface, "B200"); -} - /*********************************************************************** * Reference time and clock **********************************************************************/ -- cgit v1.2.3