aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_iface.hpp
diff options
context:
space:
mode:
authorNick Foster <nick@nerdnetworks.org>2010-07-26 16:33:17 -0700
committerNick Foster <nick@nerdnetworks.org>2010-07-26 16:33:17 -0700
commitd8f3980e45458cf68c8efaa029e492a1b8d08354 (patch)
treecf6a19cf89117483ffc3dd4901d303d2398a205f /host/lib/usrp/usrp2/usrp2_iface.hpp
parent7aec87d83f9aea23e7e9c71cdfe26aab6105f43c (diff)
downloaduhd-d8f3980e45458cf68c8efaa029e492a1b8d08354.tar.gz
uhd-d8f3980e45458cf68c8efaa029e492a1b8d08354.tar.bz2
uhd-d8f3980e45458cf68c8efaa029e492a1b8d08354.zip
Host-side changes to work with the USRP2+.
Change summary: Added clock register selection between USRP2/USRP2+ Added memory map selection between USRP2/USRP2+ Added ADS62P44 support for USRP2+
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.hpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.hpp37
1 files changed, 21 insertions, 16 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp
index 9cc32104e..b9f5f0fb8 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.hpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.hpp
@@ -25,22 +25,7 @@
#include <boost/cstdint.hpp>
#include <utility>
#include "fw_common.h"
-
-////////////////////////////////////////////////////////////////////////
-// I2C addresses
-////////////////////////////////////////////////////////////////////////
-#define I2C_DEV_EEPROM 0x50 // 24LC02[45]: 7-bits 1010xxx
-#define I2C_ADDR_MBOARD (I2C_DEV_EEPROM | 0x0)
-#define I2C_ADDR_TX_DB (I2C_DEV_EEPROM | 0x4)
-#define I2C_ADDR_RX_DB (I2C_DEV_EEPROM | 0x5)
-
-////////////////////////////////////////////////////////////////////////
-// EEPROM Layout
-////////////////////////////////////////////////////////////////////////
-#define EE_MBOARD_REV_LSB 0x00 //1 byte
-#define EE_MBOARD_REV_MSB 0x01 //1 byte
-#define EE_MBOARD_MAC_ADDR 0x02 //6 bytes
-#define EE_MBOARD_IP_ADDR 0x0C //uint32, big-endian
+#include "usrp2_regs.hpp"
/*!
* The usrp2 interface class:
@@ -118,6 +103,26 @@ public:
size_t num_bits,
bool readback
) = 0;
+
+ /*!
+ * Set the hardware revision number. Also selects the proper register set for the device.
+ * \param rev the 16-bit revision
+ */
+ virtual void set_hw_rev(int rev) = 0;
+
+ /*! Return the hardware revision number
+ * \return hardware revision
+ */
+ virtual int get_hw_rev(void) = 0;
+
+ /*!
+ * Register map selected from USRP2/USRP2+.
+ */
+ usrp2_regs_t regs;
+ /*!
+ * Hardware revision as returned by the device.
+ */
+ int hw_rev;
};
#endif /* INCLUDED_USRP2_IFACE_HPP */