Revision 4c7a66cf host/lib/usrp/usrp1/mboard_impl.cpp

b/host/lib/usrp/usrp1/mboard_impl.cpp
30 30
#include <boost/assign/list_of.hpp>
31 31
#include <boost/foreach.hpp>
32 32
#include <boost/bind.hpp>
33
#include <boost/thread/thread.hpp>
33 34
#include <iostream>
34 35

  
35 36
using namespace uhd;
......
251 252
{
252 253
    named_prop_t key = named_prop_t::extract(key_);
253 254

  
255
    if(key_.type() == typeid(std::string)) {
256
      if(key.as<std::string>() == "serial") {
257
        uhd::byte_vector_t buf;
258
        buf.insert(buf.begin(), 248);
259
        boost::this_thread::sleep(boost::posix_time::milliseconds(100));
260
        _iface->write_i2c(I2C_DEV_EEPROM, buf);
261
        boost::this_thread::sleep(boost::posix_time::milliseconds(100));
262
        buf = _iface->read_i2c(I2C_DEV_EEPROM, 8);
263
        val = std::string(buf.begin(), buf.end());
264
      }
265

  
266
      return;
267
   	}
268

  
254 269
    //handle the get request conditioned on the key
255 270
    switch(key.as<mboard_prop_t>()){
256 271
    case MBOARD_PROP_NAME:

Also available in: Unified diff