diff options
author | Martin Braun <martin.braun@ettus.com> | 2017-09-26 18:22:25 -0700 |
---|---|---|
committer | Martin Braun <martin.braun@ettus.com> | 2017-09-29 10:50:56 -0700 |
commit | 83dde40090e0bbd91c304602cc0e3c365f7878bb (patch) | |
tree | c404968e3d6d35795f331ade6ad3c176f3c1bc8b /host/include | |
parent | 59736a5bf512db83a6bd7250e14b13c7464770fc (diff) | |
download | uhd-83dde40090e0bbd91c304602cc0e3c365f7878bb.tar.gz uhd-83dde40090e0bbd91c304602cc0e3c365f7878bb.tar.bz2 uhd-83dde40090e0bbd91c304602cc0e3c365f7878bb.zip |
uhd: Changed mboard_eeprom_t interface, refactored MB EEPROM code
- uhd::usrp::mboard_eeprom_t is now simply a map. Its commit() method
has no utility being a public API call, because the user never gets
access to the appropriate I2C object (Minor API breakage)
- The central mboard_eeprom.cpp file was broken up and put into many
smaller compilation units in every device's implementation folder.
- Renamed some of the constants (e.g. B000_* -> USRP1_*, N100_* ->
N200_*)
- Removed the N000_* EEPROM code, because, well, you know, there's no
such device
Diffstat (limited to 'host/include')
-rw-r--r-- | host/include/uhd/usrp/mboard_eeprom.hpp | 42 |
1 files changed, 13 insertions, 29 deletions
diff --git a/host/include/uhd/usrp/mboard_eeprom.hpp b/host/include/uhd/usrp/mboard_eeprom.hpp index f064e9956..270cde1a2 100644 --- a/host/include/uhd/usrp/mboard_eeprom.hpp +++ b/host/include/uhd/usrp/mboard_eeprom.hpp @@ -1,5 +1,6 @@ // // Copyright 2010-2012 Ettus Research LLC +// Copyright 2017 Ettus Research (National Instruments Corp.) // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -18,41 +19,24 @@ #ifndef INCLUDED_UHD_USRP_MBOARD_EEPROM_HPP #define INCLUDED_UHD_USRP_MBOARD_EEPROM_HPP -#include <uhd/config.hpp> #include <uhd/types/dict.hpp> -#include <uhd/types/serial.hpp> #include <string> namespace uhd{ namespace usrp{ - /*! - * 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. + /*! The motherboard EEPROM object. + * + * The specific implementation knows how to read and write the EEPROM for + * various USRPs. By itself, this class is nothing but a thin wrapper + * around a string -> string dictionary. + * + * Note that writing to an object of type mboard_eeprom_t does not actually + * write to the EEPROM. Devices have their own APIs to read/write from the + * EEPROM chips themselves. Most devices will write the EEPROM itself when + * the according property is updated. */ - struct UHD_API mboard_eeprom_t : uhd::dict<std::string, std::string>{ + using mboard_eeprom_t = uhd::dict<std::string, std::string>; - //! Make a new empty mboard eeprom - mboard_eeprom_t(void); - - /*! - * Make a new mboard EEPROM handler. - * \param iface the interface to i2c - * \param which which EEPROM map to use - */ - mboard_eeprom_t(i2c_iface &iface, const std::string &which); - - /*! - * Write the contents of this object to the EEPROM. - * \param iface the interface to i2c - * \param which which EEPROM map to use - */ - void commit(i2c_iface &iface, const std::string &which) const; - - }; - -}} //namespace +}} // namespace uhd::usrp #endif /* INCLUDED_UHD_USRP_MBOARD_EEPROM_HPP */ |