aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e100
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2012-05-12 14:20:26 -0700
committerJosh Blum <josh@joshknows.com>2012-05-14 11:59:20 -0700
commitc94963a43665809d0a75cebac6283cb7c88a6f5c (patch)
treed541427555fd5c2aa206321bca2e962cc5aa3644 /host/lib/usrp/e100
parentdb6ba7d474d248c753ceee47f33db51504a8fd74 (diff)
downloaduhd-c94963a43665809d0a75cebac6283cb7c88a6f5c.tar.gz
uhd-c94963a43665809d0a75cebac6283cb7c88a6f5c.tar.bz2
uhd-c94963a43665809d0a75cebac6283cb7c88a6f5c.zip
usrp: mboard eeprom map use string as key
Diffstat (limited to 'host/lib/usrp/e100')
-rw-r--r--host/lib/usrp/e100/e100_impl.cpp6
-rw-r--r--host/lib/usrp/e100/e100_impl.hpp1
2 files changed, 4 insertions, 3 deletions
diff --git a/host/lib/usrp/e100/e100_impl.cpp b/host/lib/usrp/e100/e100_impl.cpp
index ec459b2c4..c9a7eb30e 100644
--- a/host/lib/usrp/e100/e100_impl.cpp
+++ b/host/lib/usrp/e100/e100_impl.cpp
@@ -64,7 +64,7 @@ static device_addrs_t e100_find(const device_addr_t &hint){
new_addr["node"] = fs::system_complete(fs::path(hint["node"])).string();
try{
i2c_iface::sptr i2c_iface = e100_ctrl::make_dev_i2c_iface(E100_I2C_DEV_NODE);
- const mboard_eeprom_t mb_eeprom(*i2c_iface, mboard_eeprom_t::MAP_E100);
+ const mboard_eeprom_t mb_eeprom(*i2c_iface, E100_EEPROM_MAP_KEY);
new_addr["name"] = mb_eeprom["name"];
new_addr["serial"] = mb_eeprom["serial"];
}
@@ -120,7 +120,7 @@ e100_impl::e100_impl(const uhd::device_addr_t &device_addr){
//read the eeprom so we can determine the hardware
_dev_i2c_iface = e100_ctrl::make_dev_i2c_iface(E100_I2C_DEV_NODE);
- const mboard_eeprom_t mb_eeprom(*_dev_i2c_iface, mboard_eeprom_t::MAP_E100);
+ const mboard_eeprom_t mb_eeprom(*_dev_i2c_iface, E100_EEPROM_MAP_KEY);
//determine the model string for this device
const std::string model = device_addr.get("model", mb_eeprom.get("model", ""));
@@ -449,7 +449,7 @@ double e100_impl::update_rx_codec_gain(const double gain){
}
void e100_impl::set_mb_eeprom(const uhd::usrp::mboard_eeprom_t &mb_eeprom){
- mb_eeprom.commit(*_dev_i2c_iface, mboard_eeprom_t::MAP_E100);
+ mb_eeprom.commit(*_dev_i2c_iface, E100_EEPROM_MAP_KEY);
}
void e100_impl::set_db_eeprom(const std::string &type, const uhd::usrp::dboard_eeprom_t &db_eeprom){
diff --git a/host/lib/usrp/e100/e100_impl.hpp b/host/lib/usrp/e100/e100_impl.hpp
index 2b083b932..381c085e0 100644
--- a/host/lib/usrp/e100/e100_impl.hpp
+++ b/host/lib/usrp/e100/e100_impl.hpp
@@ -53,6 +53,7 @@ static const boost::uint16_t E100_FPGA_COMPAT_NUM = 10;
static const boost::uint32_t E100_RX_SID_BASE = 2;
static const boost::uint32_t E100_TX_ASYNC_SID = 1;
static const double E100_DEFAULT_CLOCK_RATE = 64e6;
+static const std::string E100_EEPROM_MAP_KEY = "E100";
//! load an fpga image from a bin file into the usrp-e fpga
extern void e100_load_fpga(const std::string &bin_file);