Revision 7b066a45 host/lib/usrp/usrp1/mboard_impl.cpp
| b/host/lib/usrp/usrp1/mboard_impl.cpp | ||
|---|---|---|
| 19 | 19 |
#include "usrp_commands.h" |
| 20 | 20 |
#include "fpga_regs_standard.h" |
| 21 | 21 |
#include "fpga_regs_common.h" |
| 22 |
#include "usrp_i2c_addr.h" |
|
| 22 | 23 |
#include <uhd/usrp/misc_utils.hpp> |
| 23 | 24 |
#include <uhd/usrp/mboard_props.hpp> |
| 24 | 25 |
#include <uhd/usrp/dboard_props.hpp> |
| ... | ... | |
| 321 | 322 |
{
|
| 322 | 323 |
if(key.type() == typeid(std::string)) {
|
| 323 | 324 |
if(key.as<std::string>() == "load_eeprom") {
|
| 324 |
std::string usrp1_fpga_image = val.as<std::string>();
|
|
| 325 |
std::cout << "USRP1 EEPROM image: " << usrp1_fpga_image << std::endl;
|
|
| 325 |
std::string usrp1_eeprom_image = val.as<std::string>();
|
|
| 326 |
std::cout << "USRP1 EEPROM image: " << usrp1_eeprom_image << std::endl;
|
|
| 326 | 327 |
_ctrl_transport->usrp_load_eeprom(val.as<std::string>()); |
| 327 | 328 |
} |
| 328 | 329 |
|
| 330 |
if(key.as<std::string>() == "serial") {
|
|
| 331 |
std::string sernum = val.as<std::string>(); |
|
| 332 |
uhd::byte_vector_t buf(sernum.begin(), sernum.end()); |
|
| 333 |
buf.insert(buf.begin(), 248); |
|
| 334 |
_iface->write_i2c(I2C_DEV_EEPROM, buf); |
|
| 335 |
} |
|
| 336 |
|
|
| 329 | 337 |
return; |
| 330 | 338 |
} |
| 331 | 339 |
|
Also available in: Unified diff