aboutsummaryrefslogtreecommitdiffstats
path: root/host/lib/usrp/usrp2/usrp2_iface.hpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-07-05 19:12:01 -0700
committerJosh Blum <josh@joshknows.com>2010-07-05 19:12:01 -0700
commita95eaac42f6cc85fd2ad3f32dc29eeab38ef5194 (patch)
treebc1a60e25496a3a1c3ff26f0fc2d3782b6ab191d /host/lib/usrp/usrp2/usrp2_iface.hpp
parentc2039a8c92561fa5532d87cb9d875a3ad7b875c1 (diff)
downloaduhd-a95eaac42f6cc85fd2ad3f32dc29eeab38ef5194.tar.gz
uhd-a95eaac42f6cc85fd2ad3f32dc29eeab38ef5194.tar.bz2
uhd-a95eaac42f6cc85fd2ad3f32dc29eeab38ef5194.zip
usrp2: Added a peek64 to read pairs of 32 bit numbers such as time64
also added a templated host to/from network conversion in byteswap.hpp (didnt use it though)
Diffstat (limited to 'host/lib/usrp/usrp2/usrp2_iface.hpp')
-rw-r--r--host/lib/usrp/usrp2/usrp2_iface.hpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/host/lib/usrp/usrp2/usrp2_iface.hpp b/host/lib/usrp/usrp2/usrp2_iface.hpp
index 7b2a3a89d..9cc32104e 100644
--- a/host/lib/usrp/usrp2/usrp2_iface.hpp
+++ b/host/lib/usrp/usrp2/usrp2_iface.hpp
@@ -23,6 +23,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
#include <boost/cstdint.hpp>
+#include <utility>
#include "fw_common.h"
////////////////////////////////////////////////////////////////////////
@@ -49,6 +50,7 @@
class usrp2_iface : public uhd::i2c_iface, boost::noncopyable{
public:
typedef boost::shared_ptr<usrp2_iface> sptr;
+ typedef std::pair<boost::uint32_t, boost::uint32_t> pair64;
/*!
* Make a new usrp2 interface with the control transport.
@@ -65,6 +67,14 @@ public:
virtual usrp2_ctrl_data_t ctrl_send_and_recv(const usrp2_ctrl_data_t &data) = 0;
/*!
+ * Read a dual register (64 bits)
+ * \param addrlo the address for the low-32 bits
+ * \param addrhi the address for the high-32 bits
+ * \return a pair of 32 bit integers lo, hi
+ */
+ virtual pair64 peek64(boost::uint32_t addrlo, boost::uint32_t addrhi) = 0;
+
+ /*!
* Write a register (32 bits)
* \param addr the address
* \param data the 32bit data