aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/b200/b200_iface.cpp
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2013-11-19 15:51:45 -0800
committerNicholas Corgan <nick.corgan@ettus.com>2013-11-19 15:51:45 -0800
commit621f9c93f345b7f2f6d061fe503ac71b042c4d32 (patch)
treef829a580204fb0a223eb39ed46a356304f2a7791 /host/lib/usrp/b200/b200_iface.cpp
parent465da9a7d38a6f651213b8189992dd65c800d61a (diff)
parent60108e3ca8fdab91d9e0e133c96f3e06916ac934 (diff)
downloaduhd-621f9c93f345b7f2f6d061fe503ac71b042c4d32.tar.gz
uhd-621f9c93f345b7f2f6d061fe503ac71b042c4d32.tar.bz2
uhd-621f9c93f345b7f2f6d061fe503ac71b042c4d32.zip
Merge branch 'bug182'
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 a74e058d0..5c512c1d9 100644
--- a/host/lib/usrp/b200/b200_iface.cpp
+++ b/host/lib/usrp/b200/b200_iface.cpp
@@ -245,10 +245,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;
}