diff options
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), |