aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/e300/e300_eeprom_manager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'host/lib/usrp/e300/e300_eeprom_manager.cpp')
-rw-r--r--host/lib/usrp/e300/e300_eeprom_manager.cpp40
1 files changed, 20 insertions, 20 deletions
diff --git a/host/lib/usrp/e300/e300_eeprom_manager.cpp b/host/lib/usrp/e300/e300_eeprom_manager.cpp
index 00200747d..d43ca3d4c 100644
--- a/host/lib/usrp/e300/e300_eeprom_manager.cpp
+++ b/host/lib/usrp/e300/e300_eeprom_manager.cpp
@@ -21,7 +21,7 @@
namespace uhd { namespace usrp { namespace e300 {
-static const std::string _bytes_to_string(const boost::uint8_t* bytes, size_t max_len)
+static const std::string _bytes_to_string(const uint8_t* bytes, size_t max_len)
{
std::string out;
for (size_t i = 0; i < max_len; i++) {
@@ -31,7 +31,7 @@ static const std::string _bytes_to_string(const boost::uint8_t* bytes, size_t ma
return out;
}
-static void _string_to_bytes(const std::string &string, size_t max_len, boost::uint8_t* buffer)
+static void _string_to_bytes(const std::string &string, size_t max_len, uint8_t* buffer)
{
byte_vector_t bytes;
const size_t len = std::min(string.size(), max_len);
@@ -56,7 +56,7 @@ const mboard_eeprom_t& e300_eeprom_manager::read_mb_eeprom(void)
{
boost::mutex::scoped_lock(_mutex);
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(mb_eeprom_map_t));
mb_eeprom_map_t *map_ptr = reinterpret_cast<mb_eeprom_map_t*>(&bytes[0]);
memset(map_ptr, 0xff, sizeof(mb_eeprom_map_t));
@@ -68,9 +68,9 @@ const mboard_eeprom_t& e300_eeprom_manager::read_mb_eeprom(void)
mb_eeprom_map_t &map = *map_ptr;
_mb_eeprom["product"] = boost::lexical_cast<std::string>(
- uhd::ntohx<boost::uint16_t>(map.hw_product));
+ uhd::ntohx<uint16_t>(map.hw_product));
_mb_eeprom["revision"] = boost::lexical_cast<std::string>(
- uhd::ntohx<boost::uint16_t>(map.hw_revision));
+ uhd::ntohx<uint16_t>(map.hw_revision));
_mb_eeprom["serial"] = _bytes_to_string(
map.serial, MB_SERIAL_LEN);
@@ -87,7 +87,7 @@ const dboard_eeprom_t& e300_eeprom_manager::read_db_eeprom(void)
{
boost::mutex::scoped_lock(_mutex);
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(db_eeprom_map_t));
db_eeprom_map_t *map_ptr = reinterpret_cast<db_eeprom_map_t*>(&bytes[0]);
memset(map_ptr, 0xff, sizeof(db_eeprom_map_t));
@@ -99,10 +99,10 @@ const dboard_eeprom_t& e300_eeprom_manager::read_db_eeprom(void)
db_eeprom_map_t &map = *map_ptr;
_db_eeprom.id = uhd::usrp::dboard_id_t::from_uint16(
- uhd::ntohx<boost::uint16_t>(map.hw_product));
+ uhd::ntohx<uint16_t>(map.hw_product));
_db_eeprom.revision = boost::lexical_cast<std::string>(
- uhd::ntohx<boost::uint16_t>(map.hw_revision));
+ uhd::ntohx<uint16_t>(map.hw_revision));
_db_eeprom.serial = _bytes_to_string(
map.serial, DB_SERIAL_LEN);
@@ -113,7 +113,7 @@ void e300_eeprom_manager::write_db_eeprom(const dboard_eeprom_t& eeprom)
{
boost::mutex::scoped_lock(_mutex);
_db_eeprom = eeprom;
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(db_eeprom_map_t));
@@ -131,13 +131,13 @@ void e300_eeprom_manager::write_db_eeprom(const dboard_eeprom_t& eeprom)
map.data_version_minor = E310_DB_MAP_MINOR;
if (_db_eeprom.id != dboard_id_t::none()) {
- map.hw_product = uhd::htonx<boost::uint16_t>(
+ map.hw_product = uhd::htonx<uint16_t>(
_db_eeprom.id.to_uint16());
}
if (not _db_eeprom.revision.empty()) {
- map.hw_revision = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_db_eeprom.revision));
+ map.hw_revision = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_db_eeprom.revision));
}
if (not _db_eeprom.serial.empty()) {
@@ -151,7 +151,7 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
{
boost::mutex::scoped_lock(_mutex);
_mb_eeprom = eeprom;
- std::vector<boost::uint8_t> bytes;
+ std::vector<uint8_t> bytes;
bytes.resize(sizeof(mb_eeprom_map_t));
@@ -170,12 +170,12 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
if (_mb_eeprom.has_key("product")) {
- map.hw_product = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_mb_eeprom["product"]));
+ map.hw_product = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_mb_eeprom["product"]));
}
if (_mb_eeprom.has_key("revision")) {
- map.hw_revision = uhd::htonx<boost::uint16_t>(
- boost::lexical_cast<boost::uint16_t>(_mb_eeprom["revision"]));
+ map.hw_revision = uhd::htonx<uint16_t>(
+ boost::lexical_cast<uint16_t>(_mb_eeprom["revision"]));
}
if (_mb_eeprom.has_key("serial")) {
_string_to_bytes(_mb_eeprom["serial"], MB_SERIAL_LEN, map.serial);
@@ -198,13 +198,13 @@ void e300_eeprom_manager::write_mb_eeprom(const mboard_eeprom_t& eeprom)
e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type(void) const
{
boost::mutex::scoped_lock(_mutex);
- boost::uint16_t pid = boost::lexical_cast<boost::uint16_t>(
+ uint16_t pid = boost::lexical_cast<uint16_t>(
_mb_eeprom["product"]);
return get_mb_type(pid);
}
e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type(
- boost::uint16_t pid)
+ uint16_t pid)
{
switch (pid) {
case E300_MB_PID:
@@ -225,7 +225,7 @@ e300_eeprom_manager::mboard_t e300_eeprom_manager::get_mb_type(
std::string e300_eeprom_manager::get_mb_type_string(void) const
{
boost::mutex::scoped_lock(_mutex);
- boost::uint16_t product = boost::lexical_cast<boost::uint16_t>(
+ uint16_t product = boost::lexical_cast<uint16_t>(
_mb_eeprom["product"]);
switch (product) {
case E300_MB_PID: