diff options
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/dboard_eeprom.hpp | 17 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_iface.hpp | 10 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_manager.hpp | 1 | ||||
-rw-r--r-- | host/include/uhd/usrp/dboard_props.hpp | 3 |
4 files changed, 18 insertions, 13 deletions
diff --git a/host/include/uhd/usrp/dboard_eeprom.hpp b/host/include/uhd/usrp/dboard_eeprom.hpp index 6be88c85a..108027b46 100644 --- a/host/include/uhd/usrp/dboard_eeprom.hpp +++ b/host/include/uhd/usrp/dboard_eeprom.hpp @@ -32,20 +32,25 @@ struct UHD_API dboard_eeprom_t{ dboard_id_t id; /*! - * Create a dboard eeprom struct from the bytes read out of eeprom - * \param buf the vector of bytes + * Create a dboard eeprom struct from the bytes read out of eeprom. + * The constructor will parse out the dboard id from a vector of bytes. + * To be valid, the bytes vector should be at least num_bytes() long. + * If the parsing fails due to bad checksum or incomplete length, + * the dboard id in this struct will be set to dboard_id::NONE. + * \param bytes the vector of bytes */ - dboard_eeprom_t(const uhd::byte_vector_t &buf = uhd::byte_vector_t(0)); + dboard_eeprom_t(const uhd::byte_vector_t &bytes = uhd::byte_vector_t(0)); /*! - * Get the bytes that would be written to dboard eeprom + * Get the bytes that would be written to dboard eeprom. * \return a vector of bytes */ uhd::byte_vector_t get_eeprom_bytes(void); /*! - * Get the number of bytes to read out of eeprom. - * \return the number of bytes we are interested in + * Get the number of bytes in the dboard eeprom segment. + * Use this value when reading out of the dboard eeprom. + * \return the number of bytes used by dboard eeprom */ static size_t num_bytes(void); }; diff --git a/host/include/uhd/usrp/dboard_iface.hpp b/host/include/uhd/usrp/dboard_iface.hpp index 79b8ee664..1214a1a2f 100644 --- a/host/include/uhd/usrp/dboard_iface.hpp +++ b/host/include/uhd/usrp/dboard_iface.hpp @@ -95,19 +95,19 @@ public: /*! * Write to an I2C peripheral. * - * \param i2c_addr I2C bus address (7-bits) - * \param buf the data to write + * \param addr I2C bus address (7-bits) + * \param bytes the data to write */ - virtual void write_i2c(int i2c_addr, const byte_vector_t &buf) = 0; + virtual void write_i2c(boost::uint8_t addr, const byte_vector_t &bytes) = 0; /*! * Read from an I2C peripheral. * - * \param i2c_addr I2C bus address (7-bits) + * \param addr I2C bus address (7-bits) * \param num_bytes number of bytes to read * \return the data read if successful, else a zero length string. */ - virtual byte_vector_t read_i2c(int i2c_addr, size_t num_bytes) = 0; + virtual byte_vector_t read_i2c(boost::uint8_t addr, size_t num_bytes) = 0; /*! * Write data to SPI bus peripheral. diff --git a/host/include/uhd/usrp/dboard_manager.hpp b/host/include/uhd/usrp/dboard_manager.hpp index 6de64b02d..007d85bb4 100644 --- a/host/include/uhd/usrp/dboard_manager.hpp +++ b/host/include/uhd/usrp/dboard_manager.hpp @@ -33,7 +33,6 @@ namespace uhd{ namespace usrp{ * Provide wax::obj access to the subdevs inside. */ class UHD_API dboard_manager : boost::noncopyable{ - public: typedef boost::shared_ptr<dboard_manager> sptr; diff --git a/host/include/uhd/usrp/dboard_props.hpp b/host/include/uhd/usrp/dboard_props.hpp index 3b290319f..0208a6c2c 100644 --- a/host/include/uhd/usrp/dboard_props.hpp +++ b/host/include/uhd/usrp/dboard_props.hpp @@ -29,7 +29,8 @@ namespace uhd{ namespace usrp{ DBOARD_PROP_NAME = 'n', //ro, std::string DBOARD_PROP_SUBDEV = 's', //ro, wax::obj DBOARD_PROP_SUBDEV_NAMES = 'S', //ro, prop_names_t - DBOARD_PROP_USED_SUBDEVS = 'u' //ro, prop_names_t + DBOARD_PROP_USED_SUBDEVS = 'u', //ro, prop_names_t + DBOARD_PROP_DBOARD_ID = 'i' //rw, dboard_id_t //DBOARD_PROP_CODEC //ro, wax::obj //----> not sure, dont have to deal with yet }; |