aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/mboard_eeprom.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/mboard_eeprom.cpp')
-rw-r--r--host/lib/usrp/mboard_eeprom.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/host/lib/usrp/mboard_eeprom.cpp b/host/lib/usrp/mboard_eeprom.cpp
index 9c92fe252..c2415763b 100644
--- a/host/lib/usrp/mboard_eeprom.cpp
+++ b/host/lib/usrp/mboard_eeprom.cpp
@@ -213,7 +213,8 @@ struct x300_eeprom_map
//indentifying numbers
unsigned char revision[2];
unsigned char product[2];
- boost::uint8_t _pad0[4];
+ unsigned char revision_compat[2];
+ boost::uint8_t _pad0[2];
//all the mac addrs
boost::uint8_t mac_addr0[6];
@@ -244,6 +245,11 @@ static void load_x300(mboard_eeprom_t &mb_eeprom, i2c_iface &iface)
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 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,6 +297,12 @@ static void store_x300(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface)
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"])
+ );
+
//store the mac addresses
if (mb_eeprom.has_key("mac-addr0")) iface.write_eeprom(
X300_EEPROM_ADDR, offsetof(x300_eeprom_map, mac_addr0),