aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2013-07-24 17:46:04 -0700
committerJosh Blum <josh@joshknows.com>2013-07-24 17:46:04 -0700
commit0aeac60394420de1952ebc230a6fa2f8593df80a (patch)
treef08d6ca1555dc2df15a79c3da6d32cad9a6224d7 /host/include
parent690637f78685b2979a9f128ce3c82149b5421c46 (diff)
downloaduhd-0aeac60394420de1952ebc230a6fa2f8593df80a.tar.gz
uhd-0aeac60394420de1952ebc230a6fa2f8593df80a.tar.bz2
uhd-0aeac60394420de1952ebc230a6fa2f8593df80a.zip
uhd: allow for 16 bit i2c and eeprom addrs
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/types/serial.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/host/include/uhd/types/serial.hpp b/host/include/uhd/types/serial.hpp
index 5b69d07f6..7b565c633 100644
--- a/host/include/uhd/types/serial.hpp
+++ b/host/include/uhd/types/serial.hpp
@@ -48,13 +48,16 @@ namespace uhd{
virtual ~i2c_iface(void);
+ //! Create an i2c_iface than can talk to 16 bit addressable EEPROMS
+ i2c_iface::sptr eeprom16(void);
+
/*!
* Write bytes over the i2c.
* \param addr the address
* \param buf the vector of bytes
*/
virtual void write_i2c(
- boost::uint8_t addr,
+ boost::uint16_t addr,
const byte_vector_t &buf
) = 0;
@@ -65,7 +68,7 @@ namespace uhd{
* \return a vector of bytes
*/
virtual byte_vector_t read_i2c(
- boost::uint8_t addr,
+ boost::uint16_t addr,
size_t num_bytes
) = 0;
@@ -76,8 +79,8 @@ namespace uhd{
* \param buf the vector of bytes
*/
virtual void write_eeprom(
- boost::uint8_t addr,
- boost::uint8_t offset,
+ boost::uint16_t addr,
+ boost::uint16_t offset,
const byte_vector_t &buf
);
@@ -89,8 +92,8 @@ namespace uhd{
* \return a vector of bytes
*/
virtual byte_vector_t read_eeprom(
- boost::uint8_t addr,
- boost::uint8_t offset,
+ boost::uint16_t addr,
+ boost::uint16_t offset,
size_t num_bytes
);
};