diff options
Diffstat (limited to 'host/lib/usrp/dboard')
-rw-r--r-- | host/lib/usrp/dboard/twinrx/twinrx_io.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp index 8b504b549..5d099e361 100644 --- a/host/lib/usrp/dboard/twinrx/twinrx_io.hpp +++ b/host/lib/usrp/dboard/twinrx/twinrx_io.hpp @@ -108,10 +108,9 @@ public: _db_iface->set_gpio_out(dboard_iface::UNIT_BOTH, (cpld::get_reg(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)), mask<boost::uint32_t>(CPLD_FULL_ADDR)|mask<boost::uint32_t>(CPLD_DATA)); - //Sleep for 166ns to ensure that we don't toggle the enables to quickly - //nanosleep is not really accurate in userland and it is also not very - //cross-platform. So just sleep for the minimum amount of time in us. - boost::this_thread::sleep(boost::posix_time::microseconds(0)); + //Sleep for 166ns to ensure that we don't toggle the enables too quickly + //The underlying sleep function rounds to microsecond precision. + _db_iface->sleep(boost::chrono::nanoseconds(166)); //Step 2: Write the reg offset and data, and assert the necessary enable _db_iface->set_gpio_out(dboard_iface::UNIT_BOTH, (static_cast<boost::uint32_t>(addr) << shift(CPLD_FULL_ADDR)) | (data << shift(CPLD_DATA)), |