aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/n230
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2018-04-26 09:30:48 -0700
committerMartin Braun <martin.braun@ettus.com>2018-04-30 17:10:26 -0700
commit0303f1ed558b21e40f80c388b096432b4bf6e883 (patch)
tree05afcc4d2401bb86f9e38e3b04ec5b07e9268302 /host/lib/usrp/n230
parentfc67052345373c6d5c1b62064a9f9ef6f888e3ff (diff)
downloaduhd-0303f1ed558b21e40f80c388b096432b4bf6e883.tar.gz
uhd-0303f1ed558b21e40f80c388b096432b4bf6e883.tar.bz2
uhd-0303f1ed558b21e40f80c388b096432b4bf6e883.zip
lib: Purge all references to boost::this_thread::sleep()
Replace with std::this_thread::sleep_for().
Diffstat (limited to 'host/lib/usrp/n230')
-rw-r--r--host/lib/usrp/n230/n230_impl.cpp5
-rw-r--r--host/lib/usrp/n230/n230_resource_manager.cpp11
2 files changed, 10 insertions, 6 deletions
diff --git a/host/lib/usrp/n230/n230_impl.cpp b/host/lib/usrp/n230/n230_impl.cpp
index c4e3af0b2..0595ee29d 100644
--- a/host/lib/usrp/n230/n230_impl.cpp
+++ b/host/lib/usrp/n230/n230_impl.cpp
@@ -37,6 +37,9 @@
#include <boost/asio.hpp> //used for htonl and ntohl
#include <boost/make_shared.hpp>
+#include <chrono>
+#include <thread>
+
namespace uhd { namespace usrp { namespace n230 {
using namespace uhd::transport;
@@ -131,7 +134,7 @@ uhd::device_addrs_t n230_impl::n230_find(const uhd::device_addr_t &multi_dev_hin
fw_ctrl = n230_fw_ctrl_iface::make(ctrl_xport, N230_FW_PRODUCT_ID, false /*verbose*/);
break;
} catch (uhd::io_error& ex) {
- boost::this_thread::sleep(boost::posix_time::milliseconds(500));
+ std::this_thread::sleep_for(std::chrono::milliseconds(500));
first_conn_retries--;
}
}
diff --git a/host/lib/usrp/n230/n230_resource_manager.cpp b/host/lib/usrp/n230/n230_resource_manager.cpp
index e9f8b5c7d..7a68816a3 100644
--- a/host/lib/usrp/n230/n230_resource_manager.cpp
+++ b/host/lib/usrp/n230/n230_resource_manager.cpp
@@ -15,11 +15,12 @@
#include <uhd/utils/platform.hpp>
#include <uhd/utils/paths.hpp>
#include <boost/format.hpp>
-#include <boost/thread.hpp>
#include <boost/functional/hash.hpp>
#include <boost/make_shared.hpp>
#include "n230_fw_defs.h"
#include "n230_fw_host_iface.h"
+#include <chrono>
+#include <thread>
#define IF_DATA_I_MASK 0xFFF00000
#define IF_DATA_Q_MASK 0x0000FFF0
@@ -206,7 +207,7 @@ n230_resource_manager::n230_resource_manager(
_gps_uart = n230_uart::make(gps_uart_xport, uhd::htonx(gps_uart_sid.get()));
_gps_uart->set_baud_divider(fpga::BUS_CLK_RATE/fpga::GPSDO_UART_BAUDRATE);
_gps_uart->write_uart("\n"); //cause the baud and response to be setup
- boost::this_thread::sleep(boost::posix_time::seconds(1)); //allow for a little propagation
+ std::this_thread::sleep_for(std::chrono::seconds(1)); //allow for a little propagation
_gps_ctrl = gps_ctrl::make(_gps_uart);
} catch(std::exception &e) {
UHD_LOGGER_ERROR("N230") << "An error occurred making GPSDO control: " << e.what() ;
@@ -283,7 +284,7 @@ void n230_resource_manager::_claimer_loop()
_fw_ctrl->poke32(N230_FW_HOST_SHMEM_OFFSET(claim_time), time(NULL));
_fw_ctrl->poke32(N230_FW_HOST_SHMEM_OFFSET(claim_src), get_process_hash());
}
- boost::this_thread::sleep(boost::posix_time::milliseconds(N230_CLAIMER_TIMEOUT_IN_MS / 2));
+ std::this_thread::sleep_for(std::chrono::milliseconds(N230_CLAIMER_TIMEOUT_IN_MS / 2));
}
void n230_resource_manager::_initialize_radio(size_t instance)
@@ -444,7 +445,7 @@ void n230_resource_manager::_reset_codec_digital_interface()
_core_ctrl->poke32(fpga::sr_addr(fpga::SR_CORE_CLK_DELAY), fpga::CODEC_CLK_DELAY);
_core_radio_ctrl_reg.write(fpga::core_radio_ctrl_reg_t::CODEC_ARST, 1);
- boost::this_thread::sleep(boost::posix_time::milliseconds(10));
+ std::this_thread::sleep_for(std::chrono::milliseconds(10));
_core_radio_ctrl_reg.write(fpga::core_radio_ctrl_reg_t::CODEC_ARST, 0);
}
@@ -470,7 +471,7 @@ bool n230_resource_manager::_radio_data_loopback_self_test(wb_iface::sptr iface)
const uint32_t word32 = uint32_t(hash) & (IF_DATA_I_MASK | IF_DATA_Q_MASK);
iface->poke32(fpga::sr_addr(fpga::SR_RADIO_CODEC_IDLE), word32);
iface->peek64(fpga::rb_addr(fpga::RB_RADIO_CODEC_DATA)); //block until request completes
- boost::this_thread::sleep(boost::posix_time::microseconds(100)); //wait for loopback to propagate through codec
+ std::this_thread::sleep_for(std::chrono::microseconds(100)); //wait for loopback to propagate through codec
const uint64_t rb_word64 = iface->peek64(fpga::rb_addr(fpga::RB_RADIO_CODEC_DATA));
const uint32_t rb_tx = uint32_t(rb_word64 >> 32);
const uint32_t rb_rx = uint32_t(rb_word64 & 0xffffffff);