From 0aeac60394420de1952ebc230a6fa2f8593df80a Mon Sep 17 00:00:00 2001 From: Josh Blum Date: Wed, 24 Jul 2013 17:46:04 -0700 Subject: uhd: allow for 16 bit i2c and eeprom addrs --- host/include/uhd/types/serial.hpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'host/include') 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 ); }; -- cgit v1.2.3