diff options
Diffstat (limited to 'host')
-rw-r--r-- | host/utils/b2xx_fx3_utils.cpp | 32 | ||||
-rw-r--r-- | host/utils/converter_benchmark.cpp | 34 |
2 files changed, 33 insertions, 33 deletions
diff --git a/host/utils/b2xx_fx3_utils.cpp b/host/utils/b2xx_fx3_utils.cpp index 89794ed84..4d30e15dd 100644 --- a/host/utils/b2xx_fx3_utils.cpp +++ b/host/utils/b2xx_fx3_utils.cpp @@ -45,8 +45,8 @@ namespace po = boost::program_options; namespace fs = boost::filesystem; struct vid_pid_t { - boost::uint16_t vid; - boost::uint16_t pid; + uint16_t vid; + uint16_t pid; }; const static vid_pid_t known_vid_pids[] = { {FX3_VID, FX3_DEFAULT_PID}, @@ -60,17 +60,17 @@ const static vid_pid_t known_vid_pids[] = { const static std::vector<vid_pid_t> known_vid_pid_vector(known_vid_pids, known_vid_pids + (sizeof(known_vid_pids) / sizeof(known_vid_pids[0]))); static const size_t EEPROM_INIT_VALUE_VECTOR_SIZE = 8; -static uhd::byte_vector_t construct_eeprom_init_value_vector(boost::uint16_t vid, boost::uint16_t pid) +static uhd::byte_vector_t construct_eeprom_init_value_vector(uint16_t vid, uint16_t pid) { uhd::byte_vector_t init_values(EEPROM_INIT_VALUE_VECTOR_SIZE); init_values.at(0) = 0x43; init_values.at(1) = 0x59; init_values.at(2) = 0x14; init_values.at(3) = 0xB2; - init_values.at(4) = static_cast<boost::uint8_t>(pid & 0xff); - init_values.at(5) = static_cast<boost::uint8_t>(pid >> 8); - init_values.at(6) = static_cast<boost::uint8_t>(vid & 0xff); - init_values.at(7) = static_cast<boost::uint8_t>(vid >> 8); + init_values.at(4) = static_cast<uint8_t>(pid & 0xff); + init_values.at(5) = static_cast<uint8_t>(pid >> 8); + init_values.at(6) = static_cast<uint8_t>(vid & 0xff); + init_values.at(7) = static_cast<uint8_t>(vid >> 8); return init_values; } @@ -85,14 +85,14 @@ template <class T> struct to_hex{ }; //!parse hex-formatted ASCII text into an int -boost::uint16_t atoh(const std::string &string){ +uint16_t atoh(const std::string &string){ if (string.substr(0, 2) == "0x"){ std::stringstream interpreter(string); - to_hex<boost::uint16_t> hh; + to_hex<uint16_t> hh; interpreter >> hh; return hh.value; } - return boost::lexical_cast<boost::uint16_t>(string); + return boost::lexical_cast<uint16_t>(string); } int reset_usb() @@ -153,7 +153,7 @@ int reset_usb() return 0; } -uhd::transport::usb_device_handle::sptr open_device(const boost::uint16_t vid, const boost::uint16_t pid, const bool user_supplied = false) +uhd::transport::usb_device_handle::sptr open_device(const uint16_t vid, const uint16_t pid, const bool user_supplied = false) { std::vector<uhd::transport::usb_device_handle::sptr> handles; uhd::transport::usb_device_handle::sptr handle; @@ -294,8 +294,8 @@ int erase_eeprom(b200_iface::sptr& b200) return 0; } -boost::int32_t main(boost::int32_t argc, char *argv[]) { - boost::uint16_t vid, pid; +int32_t main(int32_t argc, char *argv[]) { + uint16_t vid, pid; std::string pid_str, vid_str, fw_file, fpga_file, writevid_str, writepid_str; bool user_supplied_vid_pid = false; @@ -540,11 +540,11 @@ boost::int32_t main(boost::int32_t argc, char *argv[]) { return 0; } - boost::uint8_t data_buffer[16]; + uint8_t data_buffer[16]; memset(data_buffer, 0x0, sizeof(data_buffer)); if (vm.count("speed")){ - boost::uint8_t speed; + uint8_t speed; try {speed = b200->get_usb_speed();} catch (uhd::exception &e) { std::cerr << "Exception while getting USB speed: " << e.what() << std::endl; @@ -569,7 +569,7 @@ boost::int32_t main(boost::int32_t argc, char *argv[]) { } else if (vm.count("load-fpga")) { std::cout << "Loading FPGA image (" << fpga_file << ")" << std::endl; - boost::uint32_t fx3_state; + uint32_t fx3_state; try {fx3_state = b200->load_fpga(fpga_file);} // returns 0 on success, or FX3 state on error catch (uhd::exception &e) { std::cerr << "Exception while loading FPGA: " << e.what() << std::endl; diff --git a/host/utils/converter_benchmark.cpp b/host/utils/converter_benchmark.cpp index ddbf50255..c0cd28440 100644 --- a/host/utils/converter_benchmark.cpp +++ b/host/utils/converter_benchmark.cpp @@ -131,22 +131,22 @@ void init_buffers( if (buf_seed_mode == INC) { for (size_t i = 0; i < buf.size(); i++) { if (type == "sc8") { - init_inc_vector< std::complex<boost::int8_t> >(buf[i], n_items); + init_inc_vector< std::complex<int8_t> >(buf[i], n_items); } else if (type == "sc16") { - init_inc_vector< std::complex<boost::int16_t> >(buf[i], n_items); + init_inc_vector< std::complex<int16_t> >(buf[i], n_items); } else if (type == "sc32") { - init_inc_vector< std::complex<boost::int32_t> >(buf[i], n_items); + init_inc_vector< std::complex<int32_t> >(buf[i], n_items); } else if (type == "fc32") { init_inc_vector< std::complex<float> >(buf[i], n_items); } else if (type == "fc64") { init_inc_vector< std::complex<double> >(buf[i], n_items); } else if (type == "s8") { - init_inc_vector< boost::int8_t >(buf[i], n_items); + init_inc_vector< int8_t >(buf[i], n_items); } else if (type == "s16") { - init_inc_vector< boost::int16_t >(buf[i], n_items); + init_inc_vector< int16_t >(buf[i], n_items); } else if (type == "item32") { - init_inc_vector< boost::uint32_t >(buf[i], n_items); - init_random_vector_real_int<boost::uint32_t>(buf[i], n_items); + init_inc_vector< uint32_t >(buf[i], n_items); + init_random_vector_real_int<uint32_t>(buf[i], n_items); } else { throw uhd::runtime_error(str( boost::format("Cannot handle data type: %s") % type @@ -162,21 +162,21 @@ void init_buffers( /// Fill with random data for (size_t i = 0; i < buf.size(); i++) { if (type == "sc8") { - init_random_vector_complex_int<boost::int8_t>(buf[i], n_items); + init_random_vector_complex_int<int8_t>(buf[i], n_items); } else if (type == "sc16") { - init_random_vector_complex_int<boost::int16_t>(buf[i], n_items); + init_random_vector_complex_int<int16_t>(buf[i], n_items); } else if (type == "sc32") { - init_random_vector_complex_int<boost::int32_t>(buf[i], n_items); + init_random_vector_complex_int<int32_t>(buf[i], n_items); } else if (type == "fc32") { init_random_vector_complex_float<float>(buf[i], n_items); } else if (type == "fc64") { init_random_vector_complex_float<double>(buf[i], n_items); } else if (type == "s8") { - init_random_vector_real_int<boost::int8_t>(buf[i], n_items); + init_random_vector_real_int<int8_t>(buf[i], n_items); } else if (type == "s16") { - init_random_vector_real_int<boost::int16_t>(buf[i], n_items); + init_random_vector_real_int<int16_t>(buf[i], n_items); } else if (type == "item32") { - init_random_vector_real_int<boost::uint32_t>(buf[i], n_items); + init_random_vector_real_int<uint32_t>(buf[i], n_items); } else { throw uhd::runtime_error(str( boost::format("Cannot handle data type: %s") % type @@ -240,11 +240,11 @@ std::string item_to_string( } if (type == "sc16") { - const std::complex<boost::int16_t> *ptr = reinterpret_cast<const std::complex<boost::int16_t> *>(v_ptr); + const std::complex<int16_t> *ptr = reinterpret_cast<const std::complex<int16_t> *>(v_ptr); return boost::lexical_cast<std::string>(ptr[index]); } else if (type == "sc8") { - const std::complex<boost::int8_t> *ptr = reinterpret_cast<const std::complex<boost::int8_t> *>(v_ptr); + const std::complex<int8_t> *ptr = reinterpret_cast<const std::complex<int8_t> *>(v_ptr); return boost::lexical_cast<std::string>(ptr[index]); } else if (type == "fc32") { @@ -252,11 +252,11 @@ std::string item_to_string( return boost::lexical_cast<std::string>(ptr[index]); } else if (type == "item32") { - const boost::uint32_t *ptr = reinterpret_cast<const boost::uint32_t *>(v_ptr); + const uint32_t *ptr = reinterpret_cast<const uint32_t *>(v_ptr); return boost::lexical_cast<std::string>(ptr[index]); } else if (type == "s16") { - const boost::int16_t *ptr = reinterpret_cast<const boost::int16_t *>(v_ptr); + const int16_t *ptr = reinterpret_cast<const int16_t *>(v_ptr); return boost::lexical_cast<std::string>(ptr[index]); } else { |