aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--host/examples/gpio.cpp24
-rw-r--r--host/examples/network_relay.cpp4
-rw-r--r--host/examples/test_clock_synch.cpp10
3 files changed, 19 insertions, 19 deletions
diff --git a/host/examples/gpio.cpp b/host/examples/gpio.cpp
index f0884468b..1a1b2982f 100644
--- a/host/examples/gpio.cpp
+++ b/host/examples/gpio.cpp
@@ -97,7 +97,7 @@ static const std::string GPIO_DEFAULT_CTRL = "0x0"; // all as us
static const std::string GPIO_DEFAULT_DDR = "0x0"; // all as inputs
static const std::string GPIO_DEFAULT_OUT = "0x0";
-static UHD_INLINE boost::uint32_t GPIO_BIT(const size_t x)
+static inline uint32_t GPIO_BIT(const size_t x)
{
return (1 << x);
}
@@ -107,7 +107,7 @@ namespace po = boost::program_options;
static bool stop_signal_called = false;
void sig_int_handler(int){stop_signal_called = true;}
-std::string to_bit_string(boost::uint32_t val, const size_t num_bits)
+std::string to_bit_string(uint32_t val, const size_t num_bits)
{
std::string out;
for (int i = num_bits - 1; i >= 0; i--)
@@ -132,7 +132,7 @@ void output_reg_values(
BOOST_FOREACH(std::string &attr, attrs)
{
std::cout << (boost::format("%10s:%s")
- % attr % to_bit_string(boost::uint32_t(usrp->get_gpio_attr(bank, attr)), num_bits))
+ % attr % to_bit_string(uint32_t(usrp->get_gpio_attr(bank, attr)), num_bits))
<< std::endl;
}
}
@@ -189,14 +189,14 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
output_reg_values(gpio, usrp, num_bits);
//configure GPIO registers
- boost::uint32_t ddr = strtoul(ddr_str.c_str(), NULL, 0);
- boost::uint32_t out = strtoul(out_str.c_str(), NULL, 0);
- boost::uint32_t ctrl = 0;
- boost::uint32_t atr_idle = 0;
- boost::uint32_t atr_rx = 0;
- boost::uint32_t atr_tx = 0;
- boost::uint32_t atr_duplex = 0;
- boost::uint32_t mask = (1 << num_bits) - 1;
+ uint32_t ddr = strtoul(ddr_str.c_str(), NULL, 0);
+ uint32_t out = strtoul(out_str.c_str(), NULL, 0);
+ uint32_t ctrl = 0;
+ uint32_t atr_idle = 0;
+ uint32_t atr_rx = 0;
+ uint32_t atr_tx = 0;
+ uint32_t atr_duplex = 0;
+ uint32_t mask = (1 << num_bits) - 1;
if (!vm.count("bitbang"))
{
@@ -274,7 +274,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[])
double timeout = 0.01;
uhd::time_spec_t dwell_time(dwell);
int loop = 0;
- boost::uint32_t rb, expected;
+ uint32_t rb, expected;
//register signal handler
std::signal(SIGINT, &sig_int_handler);
diff --git a/host/examples/network_relay.cpp b/host/examples/network_relay.cpp
index 0a67bbf09..b16bcaaa5 100644
--- a/host/examples/network_relay.cpp
+++ b/host/examples/network_relay.cpp
@@ -136,8 +136,8 @@ private:
//perform sequence error detection on tx dsp data (can detect bad network cards)
/*
if (_port[4] == '7'){
- static boost::uint32_t next_seq;
- const boost::uint32_t this_seq = ntohl(reinterpret_cast<const boost::uint32_t *>(&buff.front())[0]);
+ static uint32_t next_seq;
+ const uint32_t this_seq = ntohl(reinterpret_cast<const uint32_t *>(&buff.front())[0]);
if (next_seq != this_seq and this_seq != 0) std::cout << "S" << std::flush;
next_seq = this_seq + 1;
}
diff --git a/host/examples/test_clock_synch.cpp b/host/examples/test_clock_synch.cpp
index 2d438c5ca..8774c0c00 100644
--- a/host/examples/test_clock_synch.cpp
+++ b/host/examples/test_clock_synch.cpp
@@ -64,7 +64,7 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
//Variables to be set by command line options
std::string clock_args, usrp_args;
- boost::uint32_t max_interval, num_tests;
+ uint32_t max_interval, num_tests;
//Set up program options
po::options_description desc("Allowed options");
@@ -72,8 +72,8 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
("help", "Display this help message")
("clock-args", po::value<std::string>(&clock_args), "Clock device arguments")
("usrp-args", po::value<std::string>(&usrp_args), "USRP device arguments")
- ("max-interval", po::value<boost::uint32_t>(&max_interval)->default_value(10000), "Maximum interval between comparisons (in ms)")
- ("num-tests", po::value<boost::uint32_t>(&num_tests)->default_value(10), "Number of times to compare device times")
+ ("max-interval", po::value<uint32_t>(&max_interval)->default_value(10000), "Maximum interval between comparisons (in ms)")
+ ("num-tests", po::value<uint32_t>(&num_tests)->default_value(10), "Number of times to compare device times")
;
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);
@@ -133,10 +133,10 @@ int UHD_SAFE_MAIN(int argc, char *argv[]){
srand((unsigned int)time(NULL));
std::cout << boost::format("\nRunning %d comparisons at random intervals.") % num_tests << std::endl << std::endl;
- boost::uint32_t num_matches = 0;
+ uint32_t num_matches = 0;
for(size_t i = 0; i < num_tests; i++){
//Wait random time before querying
- boost::uint16_t wait_time = rand() % max_interval;
+ uint16_t wait_time = rand() % max_interval;
boost::this_thread::sleep(boost::posix_time::milliseconds(wait_time));
//Get all times before output