diff options
author | Ashish Chaudhari <ashish@ettus.com> | 2015-07-20 13:30:14 -0700 |
---|---|---|
committer | Ashish Chaudhari <ashish@ettus.com> | 2015-07-20 13:51:00 -0700 |
commit | b95f8af1da6640f09b3cc2491ab9a22a139e24ba (patch) | |
tree | b9af3550c723a34138ca54c5e75a81259815a489 /host/lib/usrp/mboard_eeprom.cpp | |
parent | afaf1e0e0fbb0478790b7d4e4bd3310faf35deba (diff) | |
download | uhd-b95f8af1da6640f09b3cc2491ab9a22a139e24ba.tar.gz uhd-b95f8af1da6640f09b3cc2491ab9a22a139e24ba.tar.bz2 uhd-b95f8af1da6640f09b3cc2491ab9a22a139e24ba.zip |
x300: Addressed code review feedback for Rev7+ support
Diffstat (limited to 'host/lib/usrp/mboard_eeprom.cpp')
-rw-r--r-- | host/lib/usrp/mboard_eeprom.cpp | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/host/lib/usrp/mboard_eeprom.cpp b/host/lib/usrp/mboard_eeprom.cpp index c2415763b..f60182c76 100644 --- a/host/lib/usrp/mboard_eeprom.cpp +++ b/host/lib/usrp/mboard_eeprom.cpp @@ -240,16 +240,16 @@ static void load_x300(mboard_eeprom_t &mb_eeprom, i2c_iface &iface) iface.read_eeprom(X300_EEPROM_ADDR, offsetof(x300_eeprom_map, revision), 2) ); - //extract the product code - mb_eeprom["product"] = uint16_bytes_to_string( - iface.read_eeprom(X300_EEPROM_ADDR, offsetof(x300_eeprom_map, product), 2) - ); - //extract the revision compat number mb_eeprom["revision_compat"] = uint16_bytes_to_string( iface.read_eeprom(X300_EEPROM_ADDR, offsetof(x300_eeprom_map, revision_compat), 2) ); + //extract the product code + mb_eeprom["product"] = uint16_bytes_to_string( + iface.read_eeprom(X300_EEPROM_ADDR, offsetof(x300_eeprom_map, product), 2) + ); + //extract the mac addresses mb_eeprom["mac-addr0"] = mac_addr_t::from_bytes(iface.read_eeprom( X300_EEPROM_ADDR, offsetof(x300_eeprom_map, mac_addr0), 6 @@ -291,18 +291,18 @@ static void store_x300(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface) string_to_uint16_bytes(mb_eeprom["revision"]) ); - //parse the product code - if (mb_eeprom.has_key("product")) iface.write_eeprom( - X300_EEPROM_ADDR, offsetof(x300_eeprom_map, product), - string_to_uint16_bytes(mb_eeprom["product"]) - ); - //parse the revision compat number if (mb_eeprom.has_key("revision_compat")) iface.write_eeprom( X300_EEPROM_ADDR, offsetof(x300_eeprom_map, revision_compat), string_to_uint16_bytes(mb_eeprom["revision_compat"]) ); + //parse the product code + if (mb_eeprom.has_key("product")) iface.write_eeprom( + X300_EEPROM_ADDR, offsetof(x300_eeprom_map, product), + string_to_uint16_bytes(mb_eeprom["product"]) + ); + //store the mac addresses if (mb_eeprom.has_key("mac-addr0")) iface.write_eeprom( X300_EEPROM_ADDR, offsetof(x300_eeprom_map, mac_addr0), |