From 64b4c1f5d7554c272884d67d0bf3d0d3d48c77ba Mon Sep 17 00:00:00 2001 From: michael-west Date: Wed, 4 Jan 2017 16:57:53 -0800 Subject: X300: Prevent MB EEPROM Corruption - Load EEPROM data into firmware memory to access from there instead of driving the I2C bus directly - Fixed firmware performance issues by removing the popcntll() function and reducing frequency of background tasks to once every 10ms - Added x300_mb_eeprom_iface to handle cases of devices with older and newer firmware - Added checks for claim to device before driving the I2C bus --- host/lib/usrp/x300/x300_impl.hpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 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 e292e2d68..81d8cd3ba 100644 --- a/host/lib/usrp/x300/x300_impl.hpp +++ b/host/lib/usrp/x300/x300_impl.hpp @@ -129,9 +129,12 @@ public: void setup_mb(const size_t which, const uhd::device_addr_t &); ~x300_impl(void); - // used by x300_find_with_addr to find X300 devices. - static boost::mutex claimer_mutex; //All claims and checks in this process are serialized - static bool is_claimed(uhd::wb_iface::sptr); + // device claim functions + enum claim_status_t {UNCLAIMED, CLAIMED_BY_US, CLAIMED_BY_OTHER}; + static claim_status_t claim_status(uhd::wb_iface::sptr iface); + static void claim(uhd::wb_iface::sptr iface); + 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, UNKNOWN -- cgit v1.2.3