host: Revert "Add ability to get time from Radio block"

This reverts commit c6d062fb34.
This commit is contained in:
Aaron Rossetto 2021-12-02 18:42:46 -06:00
parent 139522ae63
commit 16365cdc7d
3 changed files with 1 additions and 43 deletions

View File

@ -64,20 +64,6 @@ public:
// Ultimately, the exact impact of SPC is device-dependent.
virtual size_t get_spc() const = 0;
/**************************************************************************
* Time-Related API Calls
*************************************************************************/
/*! Get tick count
* \returns tick count
* \throws uhd::not_implemented_error if not implemented
*/
virtual uint64_t get_ticks_now() = 0;
/*! Get the time
* \returns time now
* \throws uhd::not_implemented_error if not implemented
*/
virtual uhd::time_spec_t get_time_now() = 0;
/**************************************************************************
* RF-Related API Calls
*************************************************************************/

View File

@ -58,12 +58,6 @@ public:
meta_range_t get_rate_range() const override;
size_t get_spc() const override;
/**************************************************************************
* Time-Related API Calls
*************************************************************************/
uint64_t get_ticks_now() override;
uhd::time_spec_t get_time_now() override;
/**************************************************************************
* RF-specific API calls
*************************************************************************/
@ -215,10 +209,6 @@ public:
{
static const uint32_t REG_COMPAT_NUM =
0x00; // Compatibility number register offset
static const uint32_t REG_TIME_LO =
0x04; // Time lower bits
static const uint32_t REG_TIME_HI =
0x08; // Time upper bits
static const uint32_t REG_RADIO_WIDTH =
0x1000 + 0x04; // Upper 16 bits is sample width, lower 16 bits is NSPC

View File

@ -26,7 +26,7 @@ const std::string radio_control::ALL_LOS = "all";
const std::string radio_control::ALL_GAINS = "";
const uint16_t radio_control_impl::MAJOR_COMPAT = 0;
const uint16_t radio_control_impl::MINOR_COMPAT = 1;
const uint16_t radio_control_impl::MINOR_COMPAT = 0;
const uint32_t radio_control_impl::regmap::REG_COMPAT_NUM;
const uint32_t radio_control_impl::regmap::REG_RADIO_WIDTH;
@ -294,24 +294,6 @@ size_t radio_control_impl::get_spc() const
return _spc;
}
/******************************************************************************
* Time-Related API Calls
*****************************************************************************/
uint64_t radio_control_impl::get_ticks_now()
{
// Time registers added in 0.1
if (_fpga_compat < 1) {
throw uhd::not_implemented_error("Radio does not support time readback");
}
return regs().peek64(regmap::REG_TIME_LO);
}
uhd::time_spec_t radio_control_impl::get_time_now()
{
return uhd::time_spec_t::from_ticks(get_ticks_now(), get_rate());
}
/****************************************************************************
* RF API
***************************************************************************/