uhd/host/lib/utils/eeprom_utils.hpp
Martin Braun 83dde40090 uhd: Changed mboard_eeprom_t interface, refactored MB EEPROM code
- uhd::usrp::mboard_eeprom_t is now simply a map. Its commit() method
  has no utility being a public API call, because the user never gets
  access to the appropriate I2C object (Minor API breakage)
- The central mboard_eeprom.cpp file was broken up and put into many
  smaller compilation units in every device's implementation folder.
- Renamed some of the constants (e.g. B000_* -> USRP1_*, N100_* ->
  N200_*)
- Removed the N000_* EEPROM code, because, well, you know, there's no
  such device
2017-09-29 10:50:56 -07:00

20 lines
598 B
C++

//
// Copyright 2017 Ettus Research (National Instruments Corp.)
//
// SPDX-License-Identifier: GPL-3.0
//
#include <uhd/types/byte_vector.hpp>
#include <uhd/types/mac_addr.hpp>
#include <boost/asio/ip/address_v4.hpp>
#include <string>
#include <vector>
static const size_t SERIAL_LEN = 9;
static const size_t NAME_MAX_LEN = 32 - SERIAL_LEN;
//! convert a string to a byte vector to write to eeprom
uhd::byte_vector_t string_to_uint16_bytes(const std::string &num_str);
//! convert a byte vector read from eeprom to a string
std::string uint16_bytes_to_string(const uhd::byte_vector_t &bytes);