diff options
author | Martin Braun <martin.braun@ettus.com> | 2016-10-31 14:30:52 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2016-11-08 08:02:22 -0800 |
commit | 99c2730bc9db270560671f2d7d173768465ed51f (patch) | |
tree | bc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/usrp/dboard/db_dbsrx2.cpp | |
parent | 218f4b0b63927110df9dbbaa8353c346eee2d98a (diff) | |
download | uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.gz uhd-99c2730bc9db270560671f2d7d173768465ed51f.tar.bz2 uhd-99c2730bc9db270560671f2d7d173768465ed51f.zip |
Remove all boost:: namespace prefix for uint32_t, int32_t etc. (fixed-width types)
- Also removes all references to boost/cstdint.hpp and replaces it with
stdint.h (The 'correct' replacement would be <cstdint>, but not all of our
compilers support that).
Diffstat (limited to 'host/lib/usrp/dboard/db_dbsrx2.cpp')
-rw-r--r-- | host/lib/usrp/dboard/db_dbsrx2.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/host/lib/usrp/dboard/db_dbsrx2.cpp b/host/lib/usrp/dboard/db_dbsrx2.cpp index 11d706ed6..21b0fd02d 100644 --- a/host/lib/usrp/dboard/db_dbsrx2.cpp +++ b/host/lib/usrp/dboard/db_dbsrx2.cpp @@ -68,7 +68,7 @@ private: uhd::dict<std::string, double> _gains; max2112_write_regs_t _max2112_write_regs; max2112_read_regs_t _max2112_read_regs; - boost::uint8_t _max2112_addr(){ //0x60 or 0x61 depending on which side + uint8_t _max2112_addr(){ //0x60 or 0x61 depending on which side return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x60 : 0x61; } @@ -76,12 +76,12 @@ private: double set_gain(double gain, const std::string &name); double set_bandwidth(double bandwidth); - void send_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){ - start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0xB)); - stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0xB)); + void send_reg(uint8_t start_reg, uint8_t stop_reg){ + start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0xB)); + stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0xB)); - for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t) - 1){ - int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) - 1 ? sizeof(boost::uint32_t) - 1 : stop_reg - start_addr + 1; + for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t) - 1){ + int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) - 1 ? sizeof(uint32_t) - 1 : stop_reg - start_addr + 1; //create buffer for register data (+1 for start address) byte_vector_t regs_vector(num_bytes + 1); @@ -104,13 +104,13 @@ private: } } - void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){ - static const boost::uint8_t status_addr = 0xC; - start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0xD)); - stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0xD)); + void read_reg(uint8_t start_reg, uint8_t stop_reg){ + static const uint8_t status_addr = 0xC; + start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0xD)); + stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0xD)); - for(boost::uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(boost::uint32_t)){ - int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(boost::uint32_t)) ? sizeof(boost::uint32_t) : stop_reg - start_addr + 1; + for(uint8_t start_addr=start_reg; start_addr <= stop_reg; start_addr += sizeof(uint32_t)){ + int num_bytes = int(stop_reg - start_addr + 1) > int(sizeof(uint32_t)) ? sizeof(uint32_t) : stop_reg - start_addr + 1; //create address to start reading register data byte_vector_t address_vector(1); @@ -129,7 +129,7 @@ private: _max2112_addr(), num_bytes ); - for(boost::uint8_t i=0; i < num_bytes; i++){ + for(uint8_t i=0; i < num_bytes; i++){ if (i + start_addr >= status_addr){ _max2112_read_regs.set_reg(i + start_addr, regs_vector[i]); /* @@ -183,7 +183,7 @@ UHD_STATIC_BLOCK(reg_dbsrx2_dboard){ dbsrx2::dbsrx2(ctor_args_t args) : rx_dboard_base(args){ //send initial register settings send_reg(0x0, 0xB); - //for (boost::uint8_t addr=0; addr<=12; addr++) this->send_reg(addr, addr); + //for (uint8_t addr=0; addr<=12; addr++) this->send_reg(addr, addr); //////////////////////////////////////////////////////////////////// // Register properties |