summaryrefslogtreecommitdiffstats
path: root/host/lib
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2011-05-05 14:58:18 -0700
committerJosh Blum <josh@joshknows.com>2011-05-05 14:58:18 -0700
commitc9bf4798cc19e9ac9bf2fbcfeeae7ed26936b19d (patch)
tree7988794fdea8dc128405c1c3dc0a0fce5bbbbdc3 /host/lib
parent5092a25ad0103b7093c1de711e2d0b83fa4cce4b (diff)
downloaduhd-c9bf4798cc19e9ac9bf2fbcfeeae7ed26936b19d.tar.gz
uhd-c9bf4798cc19e9ac9bf2fbcfeeae7ed26936b19d.tar.bz2
uhd-c9bf4798cc19e9ac9bf2fbcfeeae7ed26936b19d.zip
usrp1: overload read_eeprom to handle multi-byte reads
Diffstat (limited to 'host/lib')
-rw-r--r--host/lib/usrp/usrp1/usrp1_iface.cpp11
-rw-r--r--host/lib/usrp/usrp_e100/usrp_e100_impl.cpp1
2 files changed, 11 insertions, 1 deletions
diff --git a/host/lib/usrp/usrp1/usrp1_iface.cpp b/host/lib/usrp/usrp1/usrp1_iface.cpp
index f66337ef9..0942e2613 100644
--- a/host/lib/usrp/usrp1/usrp1_iface.cpp
+++ b/host/lib/usrp/usrp1/usrp1_iface.cpp
@@ -165,6 +165,17 @@ public:
return out_bytes;
}
+ //! overload read_eeprom to handle multi-byte reads
+ byte_vector_t read_eeprom(
+ boost::uint8_t addr,
+ boost::uint8_t offset,
+ size_t num_bytes
+ ){
+ //do a zero byte write to start read cycle
+ this->write_i2c(addr, byte_vector_t(1, offset));
+ return this->read_i2c(addr, num_bytes); //read all bytes
+ }
+
/*******************************************************************
* SPI
*
diff --git a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
index 00d7dd029..4247746ab 100644
--- a/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
+++ b/host/lib/usrp/usrp_e100/usrp_e100_impl.cpp
@@ -77,7 +77,6 @@ static device_addrs_t usrp_e100_find(const device_addr_t &hint){
* Make
**********************************************************************/
static device::sptr usrp_e100_make(const device_addr_t &device_addr){
- UHD_MSG(status) << "Opening a USRP E-Series device..." << std::endl;
//setup the main interface into fpga
std::string node = device_addr["node"];