diff options
author | Josh Blum <josh@joshknows.com> | 2011-05-16 12:08:23 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2011-05-16 12:08:23 -0700 |
commit | 22097e81dc54c895ed411c74c1829721e3a1ce5e (patch) | |
tree | 8cc9ca6d8bb0432b9562fc19636eca3421b21100 /host/lib/usrp/mboard_eeprom.cpp | |
parent | 13be023531fa1be8d43b999c3ea5ab477f101fdc (diff) | |
parent | ea5ce50a465e714c63196f52df97fb3e927e701c (diff) | |
download | uhd-22097e81dc54c895ed411c74c1829721e3a1ce5e.tar.gz uhd-22097e81dc54c895ed411c74c1829721e3a1ce5e.tar.bz2 uhd-22097e81dc54c895ed411c74c1829721e3a1ce5e.zip |
Merge branch 'master' into release_work
Diffstat (limited to 'host/lib/usrp/mboard_eeprom.cpp')
-rw-r--r-- | host/lib/usrp/mboard_eeprom.cpp | 29 |
1 files changed, 1 insertions, 28 deletions
diff --git a/host/lib/usrp/mboard_eeprom.cpp b/host/lib/usrp/mboard_eeprom.cpp index 297de990f..2ee4a9284 100644 --- a/host/lib/usrp/mboard_eeprom.cpp +++ b/host/lib/usrp/mboard_eeprom.cpp @@ -252,8 +252,7 @@ struct e100_eeprom_map{ unsigned char env_var[16]; unsigned char env_setting[64]; unsigned char serial[10]; - unsigned char name[16]; - unsigned char mcr[sizeof(float)]; + unsigned char name[NAME_MAX_LEN]; }; template <typename T> static const byte_vector_t to_bytes(const T &item){ @@ -285,20 +284,6 @@ static void load_e100(mboard_eeprom_t &mb_eeprom, i2c_iface &iface){ load_e100_string_xx(env_setting); load_e100_string_xx(serial); load_e100_string_xx(name); - - //extract the master clock rate - float master_clock_rate = 0; - const byte_vector_t rate_bytes = iface.read_eeprom( - E100_EEPROM_ADDR, offsetof(e100_eeprom_map, mcr), sizeof(master_clock_rate) - ); - std::copy( - rate_bytes.begin(), rate_bytes.end(), //source - reinterpret_cast<boost::uint8_t *>(&master_clock_rate) //destination - ); - if (master_clock_rate > 1e6 and master_clock_rate < 1e9){ - mb_eeprom["mcr"] = boost::lexical_cast<std::string>(master_clock_rate); - } - else mb_eeprom["mcr"] = ""; } static void store_e100(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){ @@ -333,18 +318,6 @@ static void store_e100(const mboard_eeprom_t &mb_eeprom, i2c_iface &iface){ store_e100_string_xx(env_setting); store_e100_string_xx(serial); store_e100_string_xx(name); - - //store the master clock rate - if (mb_eeprom.has_key("mcr")){ - const float master_clock_rate = float(boost::lexical_cast<double>(mb_eeprom["mcr"])); - const byte_vector_t rate_bytes( - reinterpret_cast<const boost::uint8_t *>(&master_clock_rate), - reinterpret_cast<const boost::uint8_t *>(&master_clock_rate) + sizeof(master_clock_rate) - ); - iface.write_eeprom( - E100_EEPROM_ADDR, offsetof(e100_eeprom_map, mcr), rate_bytes - ); - } } /*********************************************************************** |