aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200/b200_iface.cpp
diff options
context:
space:
mode:
authorMichael West <michael.west@ettus.com>2013-11-15 09:50:07 -0800
committerMichael West <michael.west@ettus.com>2013-11-15 09:50:07 -0800
commite83a941a9ff6094358602302212aed760341c873 (patch)
treec38adb41c921a3250ec2798a847a95d6adcd19ee /host/lib/usrp/b200/b200_iface.cpp
parent7641b42a89f009b1c5dc8875eef07c2a90128164 (diff)
downloaduhd-e83a941a9ff6094358602302212aed760341c873.tar.gz
uhd-e83a941a9ff6094358602302212aed760341c873.tar.bz2
uhd-e83a941a9ff6094358602302212aed760341c873.zip
BUG #182: Refactored b2xx_fx3_utils to use files from UHD
Diffstat (limited to 'host/lib/usrp/b200/b200_iface.cpp')
-rw-r--r--host/lib/usrp/b200/b200_iface.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/host/lib/usrp/b200/b200_iface.cpp b/host/lib/usrp/b200/b200_iface.cpp
index 1d05e159c..b87df2977 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -240,10 +240,12 @@ public:
size_t num_bytes
){
byte_vector_t recv_bytes(num_bytes);
- fx3_control_read(B200_VREQ_EEPROM_READ,
+ int bytes_read = fx3_control_read(B200_VREQ_EEPROM_READ,
0, offset | (boost::uint16_t(addr) << 8),
(unsigned char*) &recv_bytes[0],
num_bytes);
+ if (bytes_read != num_bytes)
+ throw uhd::io_error("Failed to read data from EEPROM.");
return recv_bytes;
}