From e2ce13e35d915c2d8b1300fd88745610c17638d1 Mon Sep 17 00:00:00 2001 From: Martin Braun Date: Thu, 25 Jul 2019 08:08:43 -0700 Subject: x300: Factor out mb-type specific code This puts all functions that identify motherboards, distinguishes X310/X300/NI2974, checks MB revs etc. into its own compilation unit. --- host/lib/usrp/x300/x300_impl.hpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'host/lib/usrp/x300/x300_impl.hpp') diff --git a/host/lib/usrp/x300/x300_impl.hpp b/host/lib/usrp/x300/x300_impl.hpp index 8d50f9914..d8bd23592 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -13,6 +13,7 @@ #include "x300_defaults.hpp" #include "x300_device_args.hpp" #include "x300_fw_common.h" +#include "x300_mboard_type.hpp" #include "x300_radio_ctrl_impl.hpp" #include "x300_regs.hpp" #include @@ -76,11 +77,8 @@ public: static bool try_to_claim(uhd::wb_iface::sptr iface, long timeout = 2000); static void release(uhd::wb_iface::sptr iface); - enum x300_mboard_t { USRP_X300_MB, USRP_X310_MB, USRP_X310_MB_NI_2974, UNKNOWN }; - static x300_mboard_t get_mb_type_from_pcie( + static uhd::usrp::x300::x300_mboard_t get_mb_type_from_pcie( const std::string& resource, const std::string& rpc_port); - static x300_mboard_t get_mb_type_from_eeprom( - const uhd::usrp::mboard_eeprom_t& mb_eeprom); //! Read out the on-board EEPROM, convert to dict, and return static uhd::usrp::mboard_eeprom_t get_mb_eeprom(uhd::i2c_iface::sptr i2c); -- cgit v1.2.3