summaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-23 19:21:47 -0700
committerJosh Blum <josh@joshknows.com>2010-04-23 19:21:47 -0700
commit039eceb4b208b2ca5a3465d2f16c8d5a7c7276c7 (patch)
tree3227f8f1656db4b4ae4c7f932ba7a3a24f6065db /host/include
parent0c3af59014f1ef3f03c099a15e74d3cdc629ef7e (diff)
downloaduhd-039eceb4b208b2ca5a3465d2f16c8d5a7c7276c7.tar.gz
uhd-039eceb4b208b2ca5a3465d2f16c8d5a7c7276c7.tar.bz2
uhd-039eceb4b208b2ca5a3465d2f16c8d5a7c7276c7.zip
Moved reading the eeprom (dboard ids) onto the host.
Created a eeprom parser for the format in the dboard. Removed the support from the microblaze code.
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/CMakeLists.txt1
-rw-r--r--host/include/uhd/usrp/dboard_eeprom.hpp55
2 files changed, 56 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/CMakeLists.txt b/host/include/uhd/usrp/CMakeLists.txt
index 23758041c..bbd124ed8 100644
--- a/host/include/uhd/usrp/CMakeLists.txt
+++ b/host/include/uhd/usrp/CMakeLists.txt
@@ -26,6 +26,7 @@ INSTALL(FILES
#### dboard headers ###
dboard_base.hpp
+ dboard_eeprom.hpp
dboard_id.hpp
dboard_iface.hpp
dboard_manager.hpp
diff --git a/host/include/uhd/usrp/dboard_eeprom.hpp b/host/include/uhd/usrp/dboard_eeprom.hpp
new file mode 100644
index 000000000..6be88c85a
--- /dev/null
+++ b/host/include/uhd/usrp/dboard_eeprom.hpp
@@ -0,0 +1,55 @@
+//
+// Copyright 2010 Ettus Research LLC
+//
+// 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
+// the Free Software Foundation, either version 3 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program. If not, see <http://www.gnu.org/licenses/>.
+//
+
+#ifndef INCLUDED_UHD_USRP_DBOARD_EEPROM_HPP
+#define INCLUDED_UHD_USRP_DBOARD_EEPROM_HPP
+
+#include <uhd/config.hpp>
+#include <uhd/usrp/dboard_id.hpp>
+#include <uhd/types/serial.hpp>
+#include <string>
+
+namespace uhd{ namespace usrp{
+
+struct UHD_API dboard_eeprom_t{
+ /*!
+ * The dboard id that was read from eeprom or will be set to eeprom.
+ */
+ dboard_id_t id;
+
+ /*!
+ * Create a dboard eeprom struct from the bytes read out of eeprom
+ * \param buf the vector of bytes
+ */
+ dboard_eeprom_t(const uhd::byte_vector_t &buf = uhd::byte_vector_t(0));
+
+ /*!
+ * 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
+ */
+ static size_t num_bytes(void);
+};
+
+}} //namespace
+
+#endif /* INCLUDED_UHD_USRP_DBOARD_EEPROM_HPP */