diff options
Diffstat (limited to 'host/lib/usrp_clock')
-rw-r--r-- | host/lib/usrp_clock/multi_usrp_clock.cpp | 4 | ||||
-rw-r--r-- | host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp | 27 | ||||
-rw-r--r-- | host/lib/usrp_clock/octoclock/octoclock_uart.cpp | 1 |
3 files changed, 9 insertions, 23 deletions
diff --git a/host/lib/usrp_clock/multi_usrp_clock.cpp b/host/lib/usrp_clock/multi_usrp_clock.cpp index 77489e13b..4d3e526d6 100644 --- a/host/lib/usrp_clock/multi_usrp_clock.cpp +++ b/host/lib/usrp_clock/multi_usrp_clock.cpp @@ -84,6 +84,10 @@ private: property_tree::sptr _tree; }; +multi_usrp_clock::~multi_usrp_clock(void){ + /* NOP */ +} + /*********************************************************************** * Multi USRP Clock factory function **********************************************************************/ diff --git a/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp b/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp index 6d54cac70..49d1a0442 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_eeprom.cpp @@ -1,5 +1,5 @@ // -// Copyright 2014 Ettus Research LLC +// Copyright 2014-2015 Ettus Research LLC // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -19,6 +19,7 @@ #include <uhd/usrp_clock/octoclock_eeprom.hpp> #include <uhd/transport/udp_simple.hpp> #include <uhd/usrp/mboard_eeprom.hpp> +#include <uhd/types/byte_vector.hpp> #include <uhd/types/mac_addr.hpp> #include <uhd/utils/byteswap.hpp> #include <boost/assign/list_of.hpp> @@ -37,30 +38,10 @@ using namespace uhd::usrp_clock; using namespace uhd::transport; /*********************************************************************** - * Utility functions - **********************************************************************/ - -//! A wrapper around std::copy that takes ranges instead of iterators. -template<typename RangeSrc, typename RangeDst> inline -void byte_copy(const RangeSrc &src, RangeDst &dst){ - std::copy(boost::begin(src), boost::end(src), boost::begin(dst)); -} - -//! create a string from a byte vector, return empty if invalid ascii -static const std::string bytes_to_string(const byte_vector_t &bytes){ - std::string out; - BOOST_FOREACH(boost::uint8_t byte, bytes){ - if (byte < 32 or byte > 127) return out; - out += byte; - } - return out; -} - -/*********************************************************************** * Implementation **********************************************************************/ void octoclock_eeprom_t::_load(){ - boost::uint32_t octoclock_data[udp_simple::mtu]; + boost::uint8_t octoclock_data[udp_simple::mtu]; const octoclock_packet_t *pkt_in = reinterpret_cast<const octoclock_packet_t*>(octoclock_data); const octoclock_fw_eeprom_t *eeprom_in = reinterpret_cast<const octoclock_fw_eeprom_t*>(pkt_in->data); @@ -109,7 +90,7 @@ void octoclock_eeprom_t::_load(){ } void octoclock_eeprom_t::_store() const { - boost::uint32_t octoclock_data[udp_simple::mtu]; + boost::uint8_t octoclock_data[udp_simple::mtu]; const octoclock_packet_t *pkt_in = reinterpret_cast<const octoclock_packet_t *>(octoclock_data); octoclock_packet_t pkt_out; diff --git a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp index eb3f40d9c..e879c4b70 100644 --- a/host/lib/usrp_clock/octoclock/octoclock_uart.cpp +++ b/host/lib/usrp_clock/octoclock/octoclock_uart.cpp @@ -111,6 +111,7 @@ namespace uhd{ void octoclock_uart_iface::_update_cache(){ octoclock_packet_t pkt_out; pkt_out.len = 0; + pkt_out.sequence = 0; size_t len = 0; boost::uint8_t octoclock_data[udp_simple::mtu]; |