aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/dboard/db_dbsrx.cpp
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2016-10-31 14:30:52 -0700
committerMartin Braun <martin.braun@ettus.com>2016-11-08 08:02:22 -0800
commit99c2730bc9db270560671f2d7d173768465ed51f (patch)
treebc4df495734a075ebe2f7917cf67dec6fb7d8177 /host/lib/usrp/dboard/db_dbsrx.cpp
parent218f4b0b63927110df9dbbaa8353c346eee2d98a (diff)
downloaduhd-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_dbsrx.cpp')
-rw-r--r--host/lib/usrp/dboard/db_dbsrx.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/host/lib/usrp/dboard/db_dbsrx.cpp b/host/lib/usrp/dboard/db_dbsrx.cpp
index 6e1846fb8..f296820c5 100644
--- a/host/lib/usrp/dboard/db_dbsrx.cpp
+++ b/host/lib/usrp/dboard/db_dbsrx.cpp
@@ -74,7 +74,7 @@ private:
uhd::dict<std::string, double> _gains;
max2118_write_regs_t _max2118_write_regs;
max2118_read_regs_t _max2118_read_regs;
- boost::uint8_t _max2118_addr(void){
+ uint8_t _max2118_addr(void){
return (this->get_iface()->get_special_props().mangle_i2c_addrs)? 0x65 : 0x67;
};
@@ -82,12 +82,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, 0x5));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x5));
+ void send_reg(uint8_t start_reg, uint8_t stop_reg){
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x5));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x5));
- 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);
@@ -110,13 +110,13 @@ private:
}
}
- void read_reg(boost::uint8_t start_reg, boost::uint8_t stop_reg){
- static const boost::uint8_t status_addr = 0x0;
- start_reg = boost::uint8_t(uhd::clip(int(start_reg), 0x0, 0x1));
- stop_reg = boost::uint8_t(uhd::clip(int(stop_reg), 0x0, 0x1));
+ void read_reg(uint8_t start_reg, uint8_t stop_reg){
+ static const uint8_t status_addr = 0x0;
+ start_reg = uint8_t(uhd::clip(int(start_reg), 0x0, 0x1));
+ stop_reg = uint8_t(uhd::clip(int(stop_reg), 0x0, 0x1));
- 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 buffer for register data
byte_vector_t regs_vector(num_bytes);
@@ -126,7 +126,7 @@ private:
_max2118_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){
_max2118_read_regs.set_reg(i + start_addr, regs_vector[i]);
}