aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp_e100/mboard_impl.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-11-10 16:48:02 -0800
committerJosh Blum <josh@joshknows.com>2010-11-10 16:48:02 -0800
commita724f4b7262c6da6d24dccdbd64e08da61cb87fc (patch)
tree6141d1215d36fc94d1deef0ec26d9ef532ea2e30 /host/lib/usrp/usrp_e100/mboard_impl.cpp
parent123de6dad521ca3dbc44a5d9fc70ff754f1196e3 (diff)
downloaduhd-a724f4b7262c6da6d24dccdbd64e08da61cb87fc.tar.gz
uhd-a724f4b7262c6da6d24dccdbd64e08da61cb87fc.tar.bz2
uhd-a724f4b7262c6da6d24dccdbd64e08da61cb87fc.zip
usrp-e100: implemented wrapper for i2c device node + ioctls, implemented e100 eeprom map
Diffstat (limited to 'host/lib/usrp/usrp_e100/mboard_impl.cpp')
-rw-r--r--host/lib/usrp/usrp_e100/mboard_impl.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp_e100/mboard_impl.cpp b/host/lib/usrp/usrp_e100/mboard_impl.cpp
index e45d7c5a0..9c6317b94 100644
--- a/host/lib/usrp/usrp_e100/mboard_impl.cpp
+++ b/host/lib/usrp/usrp_e100/mboard_impl.cpp
@@ -21,7 +21,6 @@
#include <uhd/usrp/misc_utils.hpp>
#include <uhd/utils/assert.hpp>
#include <uhd/usrp/mboard_props.hpp>
-#include <uhd/usrp/mboard_eeprom.hpp>
#include <boost/bind.hpp>
#include <iostream>
@@ -109,7 +108,7 @@ void usrp_e100_impl::mboard_get(const wax::obj &key_, wax::obj &val){
return;
case MBOARD_PROP_EEPROM_MAP:
- val = mboard_eeprom_t();
+ val = _iface->mb_eeprom;
return;
default: UHD_THROW_PROP_GET_ERROR();
@@ -159,6 +158,13 @@ void usrp_e100_impl::mboard_set(const wax::obj &key, const wax::obj &val){
));
return;
+ case MBOARD_PROP_EEPROM_MAP:
+ // Step1: commit the map, writing only those values set.
+ // Step2: readback the entire eeprom map into the iface.
+ val.as<mboard_eeprom_t>().commit(_iface->get_i2c_dev_iface(), mboard_eeprom_t::MAP_E100);
+ _iface->mb_eeprom = mboard_eeprom_t(_iface->get_i2c_dev_iface(), mboard_eeprom_t::MAP_E100);
+ return;
+
default: UHD_THROW_PROP_SET_ERROR();
}
}