diff options
author | Josh Blum <josh@joshknows.com> | 2010-11-04 19:39:57 -0700 |
---|---|---|
committer | Josh Blum <josh@joshknows.com> | 2010-11-04 19:39:57 -0700 |
commit | c8cb4bcadc32e59e98fc2901eb94830f600d5d28 (patch) | |
tree | 52e03a130bb3611b927aa80f436cc5d8d9cf9c41 /host/include | |
parent | 20c9b194aa40e28f08898256039fbbbd7883b2ad (diff) | |
download | uhd-c8cb4bcadc32e59e98fc2901eb94830f600d5d28.tar.gz uhd-c8cb4bcadc32e59e98fc2901eb94830f600d5d28.tar.bz2 uhd-c8cb4bcadc32e59e98fc2901eb94830f600d5d28.zip |
usrp2: implemented mboard eeprom into usrp2 mboard
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/mboard_eeprom.hpp | 23 | ||||
-rw-r--r-- | host/include/uhd/usrp/mboard_props.hpp | 3 |
2 files changed, 12 insertions, 14 deletions
diff --git a/host/include/uhd/usrp/mboard_eeprom.hpp b/host/include/uhd/usrp/mboard_eeprom.hpp index 0d57105b9..3bb05c0a8 100644 --- a/host/include/uhd/usrp/mboard_eeprom.hpp +++ b/host/include/uhd/usrp/mboard_eeprom.hpp @@ -21,24 +21,18 @@ #include <uhd/config.hpp> #include <uhd/types/dict.hpp> #include <uhd/types/serial.hpp> -#include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> #include <string> namespace uhd{ namespace usrp{ /*! - * The motherboard EEPROM class: + * The motherboard EEPROM object: * Knows how to read and write the EEPROM for various USRPs. * The class inherits from a string, string dictionary. * Use the dictionary interface to get and set values. * Commit to the EEPROM to save changed settings. */ - class UHD_API mboard_eeprom_t: boost::noncopyable, - public uhd::dict<std::string, std::string> - { - public: - typedef boost::shared_ptr<mboard_eeprom_t> sptr; + struct UHD_API mboard_eeprom_t : uhd::dict<std::string, std::string>{ //! Possible EEPROM maps types enum map_type{ @@ -48,14 +42,17 @@ namespace uhd{ namespace usrp{ /*! * Make a new mboard EEPROM handler. - * \param map the map type enum * \param iface the interface to i2c - * \return a new mboard EEPROM object + * \param map the map type enum */ - static sptr make(map_type map, i2c_iface &iface); + mboard_eeprom_t(i2c_iface &iface, map_type map); - //! Write the contents of this object to the EEPROM. - virtual void commit(void) = 0; + /*! + * Write the contents of this object to the EEPROM. + * \param iface the interface to i2c + * \param map the map type enum + */ + void commit(i2c_iface &iface, map_type map); }; diff --git a/host/include/uhd/usrp/mboard_props.hpp b/host/include/uhd/usrp/mboard_props.hpp index 0f250f439..df94d1678 100644 --- a/host/include/uhd/usrp/mboard_props.hpp +++ b/host/include/uhd/usrp/mboard_props.hpp @@ -44,7 +44,8 @@ namespace uhd{ namespace usrp{ MBOARD_PROP_CLOCK_CONFIG = 'C', //rw, clock_config_t MBOARD_PROP_TIME_NOW = 't', //rw, time_spec_t MBOARD_PROP_TIME_NEXT_PPS = 'T', //wo, time_spec_t - MBOARD_PROP_STREAM_CMD = 's' //wo, stream_cmd_t + MBOARD_PROP_STREAM_CMD = 's', //wo, stream_cmd_t + MBOARD_PROP_EEPROM_MAP = 'M' //wr, mboard_eeprom_t::sptr }; }} //namespace |