summaryrefslogtreecommitdiffstats
path: root/host/lib/usrp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-08-31 17:41:16 -0700
committerJosh Blum <josh@joshknows.com>2010-08-31 17:41:16 -0700
commitb5461fc3f5e7d1da74735ba5e025115dd2b7f04a (patch)
tree277eeaab4cf25df64c76a62afb1e54d8d63cd7d6 /host/lib/usrp
parent4829a9be550bf5479f9f5df66905d22e50de3a25 (diff)
parent7b066a4593646b6023f56283ff02cf0e4ee099a6 (diff)
downloaduhd-b5461fc3f5e7d1da74735ba5e025115dd2b7f04a.tar.gz
uhd-b5461fc3f5e7d1da74735ba5e025115dd2b7f04a.tar.bz2
uhd-b5461fc3f5e7d1da74735ba5e025115dd2b7f04a.zip
Merge branch 'usrp1' into next
Diffstat (limited to 'host/lib/usrp')
-rw-r--r--host/lib/usrp/usrp1/mboard_impl.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/host/lib/usrp/usrp1/mboard_impl.cpp b/host/lib/usrp/usrp1/mboard_impl.cpp
index 1409855cb..8555577f5 100644
--- a/host/lib/usrp/usrp1/mboard_impl.cpp
+++ b/host/lib/usrp/usrp1/mboard_impl.cpp
@@ -19,6 +19,7 @@
#include "usrp_commands.h"
#include "fpga_regs_standard.h"
#include "fpga_regs_common.h"
+#include "usrp_i2c_addr.h"
#include <uhd/usrp/misc_utils.hpp>
#include <uhd/usrp/mboard_props.hpp>
#include <uhd/usrp/dboard_props.hpp>
@@ -321,11 +322,18 @@ void usrp1_impl::mboard_set(const wax::obj &key, const wax::obj &val)
{
if(key.type() == typeid(std::string)) {
if(key.as<std::string>() == "load_eeprom") {
- std::string usrp1_fpga_image = val.as<std::string>();
- std::cout << "USRP1 EEPROM image: " << usrp1_fpga_image << std::endl;
+ std::string usrp1_eeprom_image = val.as<std::string>();
+ std::cout << "USRP1 EEPROM image: " << usrp1_eeprom_image << std::endl;
_ctrl_transport->usrp_load_eeprom(val.as<std::string>());
}
+ if(key.as<std::string>() == "serial") {
+ std::string sernum = val.as<std::string>();
+ uhd::byte_vector_t buf(sernum.begin(), sernum.end());
+ buf.insert(buf.begin(), 248);
+ _iface->write_i2c(I2C_DEV_EEPROM, buf);
+ }
+
return;
}