aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/x300/x300_impl.hpp
diff options
context:
space:
mode:
authormichael-west <michael.west@ettus.com>2017-01-04 16:57:53 -0800
committerMartin Braun <martin.braun@ettus.com>2017-01-10 13:51:53 -0800
commit64b4c1f5d7554c272884d67d0bf3d0d3d48c77ba (patch)
treed66fa051ce101e11bf30b5fb6217d195723df1bf /host/lib/usrp/x300/x300_impl.hpp
parent29b0fa17382c3dd9c27c556d1c5aa88f0863cb33 (diff)
downloaduhd-64b4c1f5d7554c272884d67d0bf3d0d3d48c77ba.tar.gz
uhd-64b4c1f5d7554c272884d67d0bf3d0d3d48c77ba.tar.bz2
uhd-64b4c1f5d7554c272884d67d0bf3d0d3d48c77ba.zip
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
Diffstat (limited to 'host/lib/usrp/x300/x300_impl.hpp')
-rw-r--r--host/lib/usrp/x300/x300_impl.hpp9
1 files changed, 6 insertions, 3 deletions
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