aboutsummaryrefslogtreecommitdiffstats
path: root/host
diff options
context:
space:
mode:
Diffstat (limited to 'host')
-rw-r--r--host/include/uhd/usrp_clock/octoclock_eeprom.hpp3
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_impl.cpp9
-rw-r--r--host/lib/usrp_clock/octoclock/octoclock_impl.hpp4
3 files changed, 10 insertions, 6 deletions
diff --git a/host/include/uhd/usrp_clock/octoclock_eeprom.hpp b/host/include/uhd/usrp_clock/octoclock_eeprom.hpp
index 3d514ebc2..af4df2d5f 100644
--- a/host/include/uhd/usrp_clock/octoclock_eeprom.hpp
+++ b/host/include/uhd/usrp_clock/octoclock_eeprom.hpp
@@ -11,6 +11,7 @@
#include <uhd/config.hpp>
#include <uhd/transport/udp_simple.hpp>
#include <uhd/types/dict.hpp>
+#include <uhd/usrp/mboard_eeprom.hpp>
#include <string>
namespace uhd { namespace usrp_clock {
@@ -22,7 +23,7 @@ namespace uhd { namespace usrp_clock {
* Use the dictionary interface to get and set values.
* Commit to the EEPROM to save changed settings.
*/
-class UHD_API octoclock_eeprom_t : public uhd::dict<std::string, std::string>
+class UHD_API octoclock_eeprom_t : public uhd::usrp::mboard_eeprom_t
{
public:
//! Make a new empty OctoClock EEPROM handler
diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
index 146470a7b..d5f2fe192 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_impl.cpp
@@ -264,10 +264,13 @@ octoclock_impl::octoclock_impl(const device_addr_t& _device_addr)
// Set up EEPROM
////////////////////////////////////////////////////////////////////
_oc_dict[oc].eeprom = octoclock_eeprom_t(_oc_dict[oc].ctrl_xport, _proto_ver);
- _tree->create<octoclock_eeprom_t>(oc_path / "eeprom")
+ _tree->create<uhd::usrp::mboard_eeprom_t>(oc_path / "eeprom")
.set(_oc_dict[oc].eeprom)
.add_coerced_subscriber(
- std::bind(&octoclock_impl::_set_eeprom, this, oc, std::placeholders::_1));
+ std::bind(&octoclock_impl::_set_eeprom, this, oc, std::placeholders::_1))
+ .set_publisher([this, oc]() {
+ return static_cast<uhd::usrp::mboard_eeprom_t>(this->_oc_dict[oc].eeprom);
+ });
////////////////////////////////////////////////////////////////////
// Initialize non-GPSDO sensors
@@ -352,7 +355,7 @@ bool octoclock_impl::recv_async_msg(
}
void octoclock_impl::_set_eeprom(
- const std::string& oc, const octoclock_eeprom_t& oc_eeprom)
+ const std::string& oc, const uhd::usrp::mboard_eeprom_t& oc_eeprom)
{
/*
* The OctoClock needs a full octoclock_eeprom_t so as to not erase
diff --git a/host/lib/usrp_clock/octoclock/octoclock_impl.hpp b/host/lib/usrp_clock/octoclock/octoclock_impl.hpp
index 01c1f91eb..8f36b17a0 100644
--- a/host/lib/usrp_clock/octoclock/octoclock_impl.hpp
+++ b/host/lib/usrp_clock/octoclock/octoclock_impl.hpp
@@ -15,6 +15,7 @@
#include <uhd/types/dict.hpp>
#include <uhd/types/sensors.hpp>
#include <uhd/usrp/gps_ctrl.hpp>
+#include <uhd/usrp/mboard_eeprom.hpp>
#include <uhd/usrp_clock/octoclock_eeprom.hpp>
#include <boost/thread.hpp>
#include <memory>
@@ -54,8 +55,7 @@ private:
uint32_t _sequence;
uint32_t _proto_ver;
- void _set_eeprom(
- const std::string& oc, const uhd::usrp_clock::octoclock_eeprom_t& oc_eeprom);
+ void _set_eeprom(const std::string& oc, const uhd::usrp::mboard_eeprom_t& oc_eeprom);
uint32_t _get_fw_version(const std::string& oc);