diff options
Diffstat (limited to 'host/lib/types')
-rw-r--r-- | host/lib/types/byte_vector.cpp | 2 | ||||
-rw-r--r-- | host/lib/types/mac_addr.cpp | 6 | ||||
-rw-r--r-- | host/lib/types/serial.cpp | 28 | ||||
-rw-r--r-- | host/lib/types/wb_iface.cpp | 12 |
4 files changed, 24 insertions, 24 deletions
diff --git a/host/lib/types/byte_vector.cpp b/host/lib/types/byte_vector.cpp index 071cdb8cb..15ae93858 100644 --- a/host/lib/types/byte_vector.cpp +++ b/host/lib/types/byte_vector.cpp @@ -23,7 +23,7 @@ namespace uhd{ std::string bytes_to_string(const byte_vector_t &bytes){ std::string out; - BOOST_FOREACH(boost::uint8_t byte, bytes){ + BOOST_FOREACH(uint8_t byte, bytes){ if (byte < 32 or byte > 127) return out; out += byte; } diff --git a/host/lib/types/mac_addr.cpp b/host/lib/types/mac_addr.cpp index a5cb90f97..ab71bc0c3 100644 --- a/host/lib/types/mac_addr.cpp +++ b/host/lib/types/mac_addr.cpp @@ -20,7 +20,7 @@ #include <boost/tokenizer.hpp> #include <boost/foreach.hpp> #include <boost/format.hpp> -#include <boost/cstdint.hpp> +#include <stdint.h> #include <sstream> using namespace uhd; @@ -49,7 +49,7 @@ mac_addr_t mac_addr_t::from_string(const std::string &mac_addr_str){ int hex_num; std::istringstream iss(hex_str); iss >> std::hex >> hex_num; - bytes.push_back(boost::uint8_t(hex_num)); + bytes.push_back(uint8_t(hex_num)); } } @@ -68,7 +68,7 @@ byte_vector_t mac_addr_t::to_bytes(void) const{ std::string mac_addr_t::to_string(void) const{ std::string addr = ""; - BOOST_FOREACH(boost::uint8_t byte, this->to_bytes()){ + BOOST_FOREACH(uint8_t byte, this->to_bytes()){ addr += str(boost::format("%s%02x") % ((addr == "")?"":":") % int(byte)); } return addr; diff --git a/host/lib/types/serial.cpp b/host/lib/types/serial.cpp index 52961691c..5d03d40cf 100644 --- a/host/lib/types/serial.cpp +++ b/host/lib/types/serial.cpp @@ -45,8 +45,8 @@ spi_config_t::spi_config_t(edge_t edge): } void i2c_iface::write_eeprom( - boost::uint16_t addr, - boost::uint16_t offset, + uint16_t addr, + uint16_t offset, const byte_vector_t &bytes ){ for (size_t i = 0; i < bytes.size(); i++){ @@ -58,8 +58,8 @@ void i2c_iface::write_eeprom( } byte_vector_t i2c_iface::read_eeprom( - boost::uint16_t addr, - boost::uint16_t offset, + uint16_t addr, + uint16_t offset, size_t num_bytes ){ byte_vector_t bytes; @@ -80,22 +80,22 @@ struct eeprom16_impl : i2c_iface i2c_iface* _internal; byte_vector_t read_i2c( - boost::uint16_t addr, + uint16_t addr, size_t num_bytes ){ return _internal->read_i2c(addr, num_bytes); } void write_i2c( - boost::uint16_t addr, + uint16_t addr, const byte_vector_t &bytes ){ return _internal->write_i2c(addr, bytes); } byte_vector_t read_eeprom( - boost::uint16_t addr, - boost::uint16_t offset, + uint16_t addr, + uint16_t offset, size_t num_bytes ){ byte_vector_t cmd = boost::assign::list_of(offset >> 8)(offset & 0xff); @@ -104,14 +104,14 @@ struct eeprom16_impl : i2c_iface } void write_eeprom( - boost::uint16_t addr, - boost::uint16_t offset, + uint16_t addr, + uint16_t offset, const byte_vector_t &bytes ){ for (size_t i = 0; i < bytes.size(); i++) { //write a byte at a time, its easy that way - boost::uint16_t offset_i = offset+i; + uint16_t offset_i = offset+i; byte_vector_t cmd = boost::assign::list_of(offset_i >> 8)(offset_i & 0xff)(bytes[i]); this->write_i2c(addr, cmd); boost::this_thread::sleep(boost::posix_time::milliseconds(10)); //worst case write @@ -124,10 +124,10 @@ i2c_iface::sptr i2c_iface::eeprom16(void) return i2c_iface::sptr(new eeprom16_impl(this)); } -boost::uint32_t spi_iface::read_spi( +uint32_t spi_iface::read_spi( int which_slave, const spi_config_t &config, - boost::uint32_t data, + uint32_t data, size_t num_bits ){ return transact_spi( @@ -138,7 +138,7 @@ boost::uint32_t spi_iface::read_spi( void spi_iface::write_spi( int which_slave, const spi_config_t &config, - boost::uint32_t data, + uint32_t data, size_t num_bits ){ transact_spi( diff --git a/host/lib/types/wb_iface.cpp b/host/lib/types/wb_iface.cpp index dc8d2a83e..686f0e1ee 100644 --- a/host/lib/types/wb_iface.cpp +++ b/host/lib/types/wb_iface.cpp @@ -25,32 +25,32 @@ wb_iface::~wb_iface(void) //NOP } -void wb_iface::poke64(const wb_iface::wb_addr_type, const boost::uint64_t) +void wb_iface::poke64(const wb_iface::wb_addr_type, const uint64_t) { throw uhd::not_implemented_error("poke64 not implemented"); } -boost::uint64_t wb_iface::peek64(const wb_iface::wb_addr_type) +uint64_t wb_iface::peek64(const wb_iface::wb_addr_type) { throw uhd::not_implemented_error("peek64 not implemented"); } -void wb_iface::poke32(const wb_iface::wb_addr_type, const boost::uint32_t) +void wb_iface::poke32(const wb_iface::wb_addr_type, const uint32_t) { throw uhd::not_implemented_error("poke32 not implemented"); } -boost::uint32_t wb_iface::peek32(const wb_iface::wb_addr_type) +uint32_t wb_iface::peek32(const wb_iface::wb_addr_type) { throw uhd::not_implemented_error("peek32 not implemented"); } -void wb_iface::poke16(const wb_iface::wb_addr_type, const boost::uint16_t) +void wb_iface::poke16(const wb_iface::wb_addr_type, const uint16_t) { throw uhd::not_implemented_error("poke16 not implemented"); } -boost::uint16_t wb_iface::peek16(const wb_iface::wb_addr_type) +uint16_t wb_iface::peek16(const wb_iface::wb_addr_type) { throw uhd::not_implemented_error("peek16 not implemented"); } |