aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300
diff options
context:
space:
mode:
authorMartin Braun <martin.braun@ettus.com>2021-01-08 09:33:36 +0100
committerAaron Rossetto <aaron.rossetto@ni.com>2021-03-04 08:07:26 -0600
commit107a49c0c236940da7d3bd0f57da4bc1e2a34cb4 (patch)
treefdeaad56030a02948377c45838dab97beb7a5c84 /host/lib/usrp/x300
parent7d5e48032baa62cbe7467833b9e057900602f4b9 (diff)
downloaduhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.gz
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.tar.bz2
uhd-107a49c0c236940da7d3bd0f57da4bc1e2a34cb4.zip
host: Update code base using clang-tidy
The checks from the new clang-tidy file are applied to the source tree using: $ find . -name "*.cpp" | sort -u | xargs \ --max-procs 8 --max-args 1 clang-tidy --format-style=file \ --fix -p /path/to/compile_commands.json
Diffstat (limited to 'host/lib/usrp/x300')
-rw-r--r--host/lib/usrp/x300/x300_dac_ctrl.cpp8
-rw-r--r--host/lib/usrp/x300/x300_dboard_iface.hpp71
-rw-r--r--host/lib/usrp/x300/x300_device_args.hpp4
-rw-r--r--host/lib/usrp/x300/x300_eth_mgr.cpp2
-rw-r--r--host/lib/usrp/x300/x300_eth_mgr.hpp8
-rw-r--r--host/lib/usrp/x300/x300_fw_ctrl.cpp20
-rw-r--r--host/lib/usrp/x300/x300_fw_uart.cpp4
-rw-r--r--host/lib/usrp/x300/x300_image_loader.cpp12
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp30
-rw-r--r--host/lib/usrp/x300/x300_mb_controller.hpp57
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.cpp10
-rw-r--r--host/lib/usrp/x300/x300_mb_eeprom_iface.hpp2
-rw-r--r--host/lib/usrp/x300/x300_pcie_mgr.hpp8
13 files changed, 122 insertions, 114 deletions
diff --git a/host/lib/usrp/x300/x300_dac_ctrl.cpp b/host/lib/usrp/x300/x300_dac_ctrl.cpp
index 3a3dc7389..1254e035e 100644
--- a/host/lib/usrp/x300/x300_dac_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_dac_ctrl.cpp
@@ -48,7 +48,7 @@ public:
reset();
}
- ~x300_dac_ctrl_impl(void)
+ ~x300_dac_ctrl_impl(void) override
{
UHD_SAFE_CALL(
// Power down all DAC subsystems
@@ -59,7 +59,7 @@ public:
)
}
- void reset()
+ void reset() override
{
// ADI recommendations:
//- soft reset the chip before configuration
@@ -75,7 +75,7 @@ public:
_sleep_mode(false);
}
- void sync()
+ void sync() override
{
try {
// Just return if PLL is locked and backend is synchronized
@@ -102,7 +102,7 @@ public:
throw uhd::runtime_error(err_str);
}
- void verify_sync()
+ void verify_sync() override
{
_check_pll();
_check_dac_sync();
diff --git a/host/lib/usrp/x300/x300_dboard_iface.hpp b/host/lib/usrp/x300/x300_dboard_iface.hpp
index 713c90748..607fe10dc 100644
--- a/host/lib/usrp/x300/x300_dboard_iface.hpp
+++ b/host/lib/usrp/x300/x300_dboard_iface.hpp
@@ -36,9 +36,9 @@ class x300_dboard_iface : public uhd::usrp::dboard_iface
{
public:
x300_dboard_iface(const x300_dboard_iface_config_t& config);
- ~x300_dboard_iface(void);
+ ~x300_dboard_iface(void) override;
- inline special_props_t get_special_props(void)
+ inline special_props_t get_special_props(void) override
{
special_props_t props;
props.soft_clock_divider = false;
@@ -46,39 +46,44 @@ public:
return props;
}
- void write_aux_dac(unit_t, aux_dac_t, double);
- double read_aux_adc(unit_t, aux_adc_t);
+ void write_aux_dac(unit_t, aux_dac_t, double) override;
+ double read_aux_adc(unit_t, aux_adc_t) override;
- void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_pin_ctrl(unit_t unit);
+ void set_pin_ctrl(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_pin_ctrl(unit_t unit) override;
void set_atr_reg(
- unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_atr_reg(unit_t unit, atr_reg_t reg);
- void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_ddr(unit_t unit);
- void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff);
- uint32_t get_gpio_out(unit_t unit);
- uint32_t read_gpio(unit_t unit);
-
- void set_command_time(const uhd::time_spec_t& t);
- uhd::time_spec_t get_command_time(void);
-
- void write_i2c(uint16_t, const uhd::byte_vector_t&);
- uhd::byte_vector_t read_i2c(uint16_t, size_t);
-
- void set_clock_rate(unit_t, double);
- double get_clock_rate(unit_t);
- std::vector<double> get_clock_rates(unit_t);
- void set_clock_enabled(unit_t, bool);
- double get_codec_rate(unit_t);
-
- void write_spi(
- unit_t unit, const uhd::spi_config_t& config, uint32_t data, size_t num_bits);
-
- uint32_t read_write_spi(
- unit_t unit, const uhd::spi_config_t& config, uint32_t data, size_t num_bits);
- void set_fe_connection(
- unit_t unit, const std::string& name, const uhd::usrp::fe_connection_t& fe_conn);
+ unit_t unit, atr_reg_t reg, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_atr_reg(unit_t unit, atr_reg_t reg) override;
+ void set_gpio_ddr(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_ddr(unit_t unit) override;
+ void set_gpio_out(unit_t unit, uint32_t value, uint32_t mask = 0xffffffff) override;
+ uint32_t get_gpio_out(unit_t unit) override;
+ uint32_t read_gpio(unit_t unit) override;
+
+ void set_command_time(const uhd::time_spec_t& t) override;
+ uhd::time_spec_t get_command_time(void) override;
+
+ void write_i2c(uint16_t, const uhd::byte_vector_t&) override;
+ uhd::byte_vector_t read_i2c(uint16_t, size_t) override;
+
+ void set_clock_rate(unit_t, double) override;
+ double get_clock_rate(unit_t) override;
+ std::vector<double> get_clock_rates(unit_t) override;
+ void set_clock_enabled(unit_t, bool) override;
+ double get_codec_rate(unit_t) override;
+
+ void write_spi(unit_t unit,
+ const uhd::spi_config_t& config,
+ uint32_t data,
+ size_t num_bits) override;
+
+ uint32_t read_write_spi(unit_t unit,
+ const uhd::spi_config_t& config,
+ uint32_t data,
+ size_t num_bits) override;
+ void set_fe_connection(unit_t unit,
+ const std::string& name,
+ const uhd::usrp::fe_connection_t& fe_conn) override;
// X300 can set the FE connection on the RX side
bool has_set_fe_connection(const unit_t unit) override
diff --git a/host/lib/usrp/x300/x300_device_args.hpp b/host/lib/usrp/x300/x300_device_args.hpp
index 7e17c36ce..3a620f7de 100644
--- a/host/lib/usrp/x300/x300_device_args.hpp
+++ b/host/lib/usrp/x300/x300_device_args.hpp
@@ -146,7 +146,7 @@ public:
return _orig_args;
}
- inline virtual std::string to_string() const
+ inline std::string to_string() const override
{
// We leave out blank_eeprom for safety reasons
return (!_first_addr.get().empty() ? (_first_addr.to_string() + ", ") : "")
@@ -185,7 +185,7 @@ public:
}
private:
- virtual void _parse(const device_addr_t& dev_args)
+ void _parse(const device_addr_t& dev_args) override
{
_orig_args = dev_args;
// Extract parameters from dev_args
diff --git a/host/lib/usrp/x300/x300_eth_mgr.cpp b/host/lib/usrp/x300/x300_eth_mgr.cpp
index 8cdba38cc..d7b8b15c4 100644
--- a/host/lib/usrp/x300/x300_eth_mgr.cpp
+++ b/host/lib/usrp/x300/x300_eth_mgr.cpp
@@ -555,7 +555,7 @@ void eth_manager::discover_eth(
}
}
- if (eth_conns.size() == 0) {
+ if (eth_conns.empty()) {
throw uhd::assertion_error(
"X300 Initialization Error: No valid Ethernet interfaces specified.");
}
diff --git a/host/lib/usrp/x300/x300_eth_mgr.hpp b/host/lib/usrp/x300/x300_eth_mgr.hpp
index 19b6064dd..ee1d1d726 100644
--- a/host/lib/usrp/x300/x300_eth_mgr.hpp
+++ b/host/lib/usrp/x300/x300_eth_mgr.hpp
@@ -39,12 +39,12 @@ public:
/*! Return a reference to a ZPU ctrl interface object
*/
- uhd::wb_iface::sptr get_ctrl_iface();
+ uhd::wb_iface::sptr get_ctrl_iface() override;
void init_link(
const mboard_eeprom_t& mb_eeprom, const std::string& loaded_fpga_image);
- size_t get_mtu(uhd::direction_t dir);
+ size_t get_mtu(uhd::direction_t dir) override;
/*! Safely release a ZPU control object
*
@@ -57,7 +57,7 @@ public:
*
* Note: this will only be valid after init_link() is called.
*/
- std::vector<uhd::rfnoc::device_id_t> get_local_device_ids()
+ std::vector<uhd::rfnoc::device_id_t> get_local_device_ids() override
{
return _local_device_ids;
}
@@ -66,7 +66,7 @@ public:
const uhd::rfnoc::device_id_t local_device_id,
const uhd::rfnoc::sep_id_t& local_epid,
const uhd::rfnoc::sep_id_t& remote_epid,
- const uhd::device_addr_t& link_args);
+ const uhd::device_addr_t& link_args) override;
private:
//! Function to create a udp_simple::sptr (kernel-based or DPDK-based)
diff --git a/host/lib/usrp/x300/x300_fw_ctrl.cpp b/host/lib/usrp/x300/x300_fw_ctrl.cpp
index cbe48bfe8..9cbad7576 100644
--- a/host/lib/usrp/x300/x300_fw_ctrl.cpp
+++ b/host/lib/usrp/x300/x300_fw_ctrl.cpp
@@ -39,7 +39,7 @@ public:
__flush();
}
- void poke32(const wb_addr_type addr, const uint32_t data)
+ void poke32(const wb_addr_type addr, const uint32_t data) override
{
for (size_t i = 1; i <= num_retries; i++) {
boost::mutex::scoped_lock lock(reg_access);
@@ -57,7 +57,7 @@ public:
}
}
- uint32_t peek32(const wb_addr_type addr)
+ uint32_t peek32(const wb_addr_type addr) override
{
for (size_t i = 1; i <= num_retries; i++) {
boost::mutex::scoped_lock lock(reg_access);
@@ -105,7 +105,7 @@ public:
}
protected:
- virtual void __poke32(const wb_addr_type addr, const uint32_t data)
+ void __poke32(const wb_addr_type addr, const uint32_t data) override
{
// load request struct
x300_fw_comms_t request = x300_fw_comms_t();
@@ -136,7 +136,7 @@ protected:
UHD_ASSERT_THROW(reply.data == request.data);
}
- virtual uint32_t __peek32(const wb_addr_type addr)
+ uint32_t __peek32(const wb_addr_type addr) override
{
// load request struct
x300_fw_comms_t request = x300_fw_comms_t();
@@ -169,14 +169,14 @@ protected:
return uhd::ntohx<uint32_t>(reply.data);
}
- virtual void __flush(void)
+ void __flush(void) override
{
char buff[X300_FW_COMMS_MTU] = {};
while (udp->recv(boost::asio::buffer(buff), 0.0)) {
} // flush
}
- virtual std::string __loc_info(void)
+ std::string __loc_info(void) override
{
return udp->get_send_addr();
}
@@ -233,7 +233,7 @@ public:
}
protected:
- virtual void __poke32(const wb_addr_type addr, const uint32_t data)
+ void __poke32(const wb_addr_type addr, const uint32_t data) override
{
nirio_status status = 0;
uint32_t reg_data = 0xffffffff;
@@ -261,7 +261,7 @@ protected:
throw uhd::io_error("x300 fw poke32 - operation timed out");
}
- virtual uint32_t __peek32(const wb_addr_type addr)
+ uint32_t __peek32(const wb_addr_type addr) override
{
nirio_status status = 0;
uint32_t reg_data = 0xffffffff;
@@ -293,12 +293,12 @@ protected:
return reg_data;
}
- virtual void __flush(void)
+ void __flush(void) override
{
__peek32(0);
}
- virtual std::string __loc_info(void)
+ std::string __loc_info(void) override
{
return std::to_string(_drv_proxy->get_interface_num());
}
diff --git a/host/lib/usrp/x300/x300_fw_uart.cpp b/host/lib/usrp/x300/x300_fw_uart.cpp
index 0dde87da5..1bfc2a2e4 100644
--- a/host/lib/usrp/x300/x300_fw_uart.cpp
+++ b/host/lib/usrp/x300/x300_fw_uart.cpp
@@ -50,7 +50,7 @@ struct x300_uart_iface : uart_iface
}
}
- void write_uart(const std::string& buff)
+ void write_uart(const std::string& buff) override
{
boost::mutex::scoped_lock lock(_write_mutex);
for (const char ch : buff) {
@@ -118,7 +118,7 @@ struct x300_uart_iface : uart_iface
}
}
- std::string read_uart(double timeout)
+ std::string read_uart(double timeout) override
{
boost::mutex::scoped_lock lock(_read_mutex);
const auto exit_time = std::chrono::steady_clock::now()
diff --git a/host/lib/usrp/x300/x300_image_loader.cpp b/host/lib/usrp/x300/x300_image_loader.cpp
index 474aed4cb..f18af02b7 100644
--- a/host/lib/usrp/x300/x300_image_loader.cpp
+++ b/host/lib/usrp/x300/x300_image_loader.cpp
@@ -180,7 +180,7 @@ static void x300_setup_session(x300_session_t& session,
const std::string& outpath)
{
device_addrs_t devs = x300_find(args);
- if (devs.size() == 0) {
+ if (devs.empty()) {
session.found = false;
return;
} else if (devs.size() > 1) {
@@ -224,8 +224,8 @@ static void x300_setup_session(x300_session_t& session,
* If this cannot be determined, then the user is forced to specify a filename.
*/
session.fpga_type = args.get("fpga", session.dev_addr.get("fpga", ""));
- if (filepath == "") {
- if (!session.dev_addr.has_key("product") or session.fpga_type == "") {
+ if (filepath.empty()) {
+ if (!session.dev_addr.has_key("product") or session.fpga_type.empty()) {
throw uhd::runtime_error(
"Found a device but could not auto-generate an image filename.");
} else {
@@ -243,8 +243,8 @@ static void x300_setup_session(x300_session_t& session,
* The user can specify an output image path, or UHD will use the
* system temporary path by default
*/
- if (outpath == "") {
- if (!session.dev_addr.has_key("product") or session.fpga_type == "") {
+ if (outpath.empty()) {
+ if (!session.dev_addr.has_key("product") or session.fpga_type.empty()) {
throw uhd::runtime_error(
"Found a device but could not auto-generate an image filename.");
}
@@ -598,7 +598,7 @@ static bool x300_image_loader(const image_loader::image_loader_args_t& image_loa
// See if any X3x0 with the given args is found
device_addrs_t devs = x300_find(image_loader_args.args);
- if (devs.size() == 0)
+ if (devs.empty())
return false;
x300_session_t session;
diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp
index c506fcf28..218582653 100644
--- a/host/lib/usrp/x300/x300_impl.hpp
+++ b/host/lib/usrp/x300/x300_impl.hpp
@@ -45,12 +45,12 @@ class x300_impl : public uhd::rfnoc::detail::rfnoc_device
public:
x300_impl(const uhd::device_addr_t&);
void setup_mb(const size_t which, const uhd::device_addr_t&);
- ~x300_impl(void);
+ ~x300_impl(void) override;
/**************************************************************************
* rfnoc_device API
*************************************************************************/
- virtual uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx)
+ uhd::rfnoc::mb_iface& get_mb_iface(const size_t mb_idx) override
{
if (mb_idx >= _mb_ifaces.size()) {
throw uhd::index_error(
@@ -101,19 +101,21 @@ private:
x300_mb_iface(uhd::usrp::x300::conn_manager::sptr conn_mgr,
const double radio_clk_freq,
const uhd::rfnoc::device_id_t remote_dev_id);
- ~x300_mb_iface();
- uint16_t get_proto_ver();
- uhd::rfnoc::chdr_w_t get_chdr_w();
- uhd::endianness_t get_endianness(const uhd::rfnoc::device_id_t local_device_id);
- uhd::rfnoc::device_id_t get_remote_device_id();
- std::vector<uhd::rfnoc::device_id_t> get_local_device_ids();
+ ~x300_mb_iface() override;
+ uint16_t get_proto_ver() override;
+ uhd::rfnoc::chdr_w_t get_chdr_w() override;
+ uhd::endianness_t get_endianness(
+ const uhd::rfnoc::device_id_t local_device_id) override;
+ uhd::rfnoc::device_id_t get_remote_device_id() override;
+ std::vector<uhd::rfnoc::device_id_t> get_local_device_ids() override;
uhd::transport::adapter_id_t get_adapter_id(
- const uhd::rfnoc::device_id_t local_device_id);
- void reset_network();
- uhd::rfnoc::clock_iface::sptr get_clock_iface(const std::string& clock_name);
+ const uhd::rfnoc::device_id_t local_device_id) override;
+ void reset_network() override;
+ uhd::rfnoc::clock_iface::sptr get_clock_iface(
+ const std::string& clock_name) override;
uhd::rfnoc::chdr_ctrl_xport::sptr make_ctrl_transport(
uhd::rfnoc::device_id_t local_device_id,
- const uhd::rfnoc::sep_id_t& local_epid);
+ const uhd::rfnoc::sep_id_t& local_epid) override;
uhd::rfnoc::chdr_rx_data_xport::uptr make_rx_data_transport(
uhd::rfnoc::mgmt::mgmt_portal& mgmt_portal,
const uhd::rfnoc::sep_addr_pair_t& addrs,
@@ -121,7 +123,7 @@ private:
const uhd::rfnoc::sw_buff_t pyld_buff_fmt,
const uhd::rfnoc::sw_buff_t mdata_buff_fmt,
const uhd::device_addr_t& xport_args,
- const std::string& streamer_id);
+ const std::string& streamer_id) override;
uhd::rfnoc::chdr_tx_data_xport::uptr make_tx_data_transport(
uhd::rfnoc::mgmt::mgmt_portal& mgmt_portal,
const uhd::rfnoc::sep_addr_pair_t& addrs,
@@ -129,7 +131,7 @@ private:
const uhd::rfnoc::sw_buff_t pyld_buff_fmt,
const uhd::rfnoc::sw_buff_t mdata_buff_fmt,
const uhd::device_addr_t& xport_args,
- const std::string& streamer_id);
+ const std::string& streamer_id) override;
private:
const uhd::rfnoc::device_id_t _remote_dev_id;
diff --git a/host/lib/usrp/x300/x300_mb_controller.hpp b/host/lib/usrp/x300/x300_mb_controller.hpp
index f33d629c7..6cfa3f525 100644
--- a/host/lib/usrp/x300/x300_mb_controller.hpp
+++ b/host/lib/usrp/x300/x300_mb_controller.hpp
@@ -42,7 +42,7 @@ public:
uhd::usrp::mboard_eeprom_t mb_eeprom,
uhd::usrp::x300::x300_device_args_t args);
- ~x300_mb_controller();
+ ~x300_mb_controller() override;
/**************************************************************************
* X300-Specific APIs
@@ -95,11 +95,11 @@ public:
{
set_tick_rate(tick_rate);
}
- uint64_t get_ticks_now();
- uint64_t get_ticks_last_pps();
- void set_ticks_now(const uint64_t ticks);
- void set_ticks_next_pps(const uint64_t ticks);
- void set_period(const uint64_t period_ns);
+ uint64_t get_ticks_now() override;
+ uint64_t get_ticks_last_pps() override;
+ void set_ticks_now(const uint64_t ticks) override;
+ void set_ticks_next_pps(const uint64_t ticks) override;
+ void set_period(const uint64_t period_ns) override;
private:
uint32_t get_tk_addr(const uint32_t tk_addr);
@@ -110,30 +110,31 @@ public:
/**************************************************************************
* Motherboard Control API (see mb_controller.hpp)
*************************************************************************/
- void init();
- std::string get_mboard_name() const;
- void set_time_source(const std::string& source);
- std::string get_time_source() const;
- std::vector<std::string> get_time_sources() const;
- void set_clock_source(const std::string& source);
- std::string get_clock_source() const;
- std::vector<std::string> get_clock_sources() const;
- void set_sync_source(const std::string& clock_source, const std::string& time_source);
- void set_sync_source(const device_addr_t& sync_source);
- device_addr_t get_sync_source() const;
- std::vector<device_addr_t> get_sync_sources();
- void set_clock_source_out(const bool enb);
- void set_time_source_out(const bool enb);
- sensor_value_t get_sensor(const std::string& name);
- std::vector<std::string> get_sensor_names();
- uhd::usrp::mboard_eeprom_t get_eeprom();
+ void init() override;
+ std::string get_mboard_name() const override;
+ void set_time_source(const std::string& source) override;
+ std::string get_time_source() const override;
+ std::vector<std::string> get_time_sources() const override;
+ void set_clock_source(const std::string& source) override;
+ std::string get_clock_source() const override;
+ std::vector<std::string> get_clock_sources() const override;
+ void set_sync_source(
+ const std::string& clock_source, const std::string& time_source) override;
+ void set_sync_source(const device_addr_t& sync_source) override;
+ device_addr_t get_sync_source() const override;
+ std::vector<device_addr_t> get_sync_sources() override;
+ void set_clock_source_out(const bool enb) override;
+ void set_time_source_out(const bool enb) override;
+ sensor_value_t get_sensor(const std::string& name) override;
+ std::vector<std::string> get_sensor_names() override;
+ uhd::usrp::mboard_eeprom_t get_eeprom() override;
bool synchronize(std::vector<mb_controller::sptr>& mb_controllers,
const uhd::time_spec_t& time_spec = uhd::time_spec_t(0.0),
- const bool quiet = false);
- std::vector<std::string> get_gpio_banks() const;
- std::vector<std::string> get_gpio_srcs(const std::string&) const;
- std::vector<std::string> get_gpio_src(const std::string&);
- void set_gpio_src(const std::string&, const std::vector<std::string>&);
+ const bool quiet = false) override;
+ std::vector<std::string> get_gpio_banks() const override;
+ std::vector<std::string> get_gpio_srcs(const std::string&) const override;
+ std::vector<std::string> get_gpio_src(const std::string&) override;
+ void set_gpio_src(const std::string&, const std::vector<std::string>&) override;
private:
//! Return a string X300::MB_CTRL#N
diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
index 42d0b32ca..4eaccccc4 100644
--- a/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
+++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.cpp
@@ -41,7 +41,7 @@ public:
_compat_num = _wb->peek32(X300_FW_SHMEM_ADDR(X300_FW_SHMEM_COMPAT_NUM));
}
- ~x300_mb_eeprom_iface_impl()
+ ~x300_mb_eeprom_iface_impl() override
{
/* NOP */
}
@@ -51,7 +51,7 @@ public:
* \param addr the address
* \param buf the vector of bytes
*/
- void write_i2c(uint16_t addr, const byte_vector_t& buf)
+ void write_i2c(uint16_t addr, const byte_vector_t& buf) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
if (uhd::usrp::x300::claim_status(_wb) != uhd::usrp::x300::CLAIMED_BY_US) {
@@ -66,7 +66,7 @@ public:
* \param num_bytes number of bytes to read
* \return a vector of bytes
*/
- byte_vector_t read_i2c(uint16_t addr, size_t num_bytes)
+ byte_vector_t read_i2c(uint16_t addr, size_t num_bytes) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
byte_vector_t bytes;
@@ -93,7 +93,7 @@ public:
* \param offset byte offset
* \param buf the vector of bytes
*/
- void write_eeprom(uint16_t addr, uint16_t offset, const byte_vector_t& buf)
+ void write_eeprom(uint16_t addr, uint16_t offset, const byte_vector_t& buf) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
if (uhd::usrp::x300::claim_status(_wb) != uhd::usrp::x300::CLAIMED_BY_US) {
@@ -109,7 +109,7 @@ public:
* \param num_bytes number of bytes to read
* \return a vector of bytes
*/
- byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes)
+ byte_vector_t read_eeprom(uint16_t addr, uint16_t offset, size_t num_bytes) override
{
UHD_ASSERT_THROW(addr == MBOARD_EEPROM_ADDR);
byte_vector_t bytes;
diff --git a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
index 935f6302d..964a98b84 100644
--- a/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
+++ b/host/lib/usrp/x300/x300_mb_eeprom_iface.hpp
@@ -19,7 +19,7 @@ class x300_mb_eeprom_iface : public uhd::i2c_iface
public:
typedef std::shared_ptr<x300_mb_eeprom_iface> sptr;
- virtual ~x300_mb_eeprom_iface(void) = 0;
+ ~x300_mb_eeprom_iface(void) override = 0;
static sptr make(uhd::wb_iface::sptr wb, uhd::i2c_iface::sptr i2c);
};
diff --git a/host/lib/usrp/x300/x300_pcie_mgr.hpp b/host/lib/usrp/x300/x300_pcie_mgr.hpp
index f0a5ed911..d6cb03071 100644
--- a/host/lib/usrp/x300/x300_pcie_mgr.hpp
+++ b/host/lib/usrp/x300/x300_pcie_mgr.hpp
@@ -37,11 +37,11 @@ public:
/*! Return a reference to a ZPU ctrl interface object
*/
- uhd::wb_iface::sptr get_ctrl_iface();
+ uhd::wb_iface::sptr get_ctrl_iface() override;
void init_link();
- size_t get_mtu(uhd::direction_t dir);
+ size_t get_mtu(uhd::direction_t dir) override;
/*! Safely release a ZPU control object
*
@@ -52,7 +52,7 @@ public:
/*! Return list of local device IDs associated with this link
*/
- std::vector<uhd::rfnoc::device_id_t> get_local_device_ids()
+ std::vector<uhd::rfnoc::device_id_t> get_local_device_ids() override
{
return {_local_device_id};
}
@@ -61,7 +61,7 @@ public:
const uhd::rfnoc::device_id_t local_device_id,
const uhd::rfnoc::sep_id_t& local_epid,
const uhd::rfnoc::sep_id_t& remote_epid,
- const uhd::device_addr_t& link_args);
+ const uhd::device_addr_t& link_args) override;
private:
/*! Allocate or return a previously allocated PCIe channel pair