aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorAshish Chaudhari <ashish@ettus.com>2015-08-06 10:23:10 -0500
committerAshish Chaudhari <ashish@ettus.com>2015-08-06 10:23:10 -0500
commitcc6853bd475238012a97743891854194efc26862 (patch)
tree9ab9fc47e2e0f60248e5c7cae0ada0407f0298c0 /host/include
parentc7f24e49db47aec2008b072bb6fb9b6dddc36797 (diff)
downloaduhd-cc6853bd475238012a97743891854194efc26862.tar.gz
uhd-cc6853bd475238012a97743891854194efc26862.tar.bz2
uhd-cc6853bd475238012a97743891854194efc26862.zip
uhd: Register API enhancements
- Added get_register_info function to get bitwidth and R/W access for a registers - Better error reporting
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/multi_usrp.hpp27
1 files changed, 20 insertions, 7 deletions
diff --git a/host/include/uhd/usrp/multi_usrp.hpp b/host/include/uhd/usrp/multi_usrp.hpp
index 0c1e73895..80501e489 100644
--- a/host/include/uhd/usrp/multi_usrp.hpp
+++ b/host/include/uhd/usrp/multi_usrp.hpp
@@ -977,6 +977,26 @@ public:
/*******************************************************************
* Register IO methods
******************************************************************/
+ struct register_info_t {
+ size_t bitwidth;
+ bool readable;
+ bool writable;
+ };
+
+ /*!
+ * Enumerate the full paths of all low-level USRP register accessible to read/write
+ * \param mboard the motherboard index 0 to M-1
+ * \return a vector of register paths
+ */
+ virtual std::vector<std::string> enumerate_registers(const size_t mboard = 0) = 0;
+
+ /*!
+ * Get more information about a low-level device register
+ * \param path the full path to the register
+ * \param mboard the motherboard index 0 to M-1
+ * \return the info struct which contains the bitwidth and read-write access information
+ */
+ virtual register_info_t get_register_info(const std::string &path, const size_t mboard = 0) = 0;
/*!
* Write a low-level register field for a register in the USRP hardware
@@ -996,13 +1016,6 @@ public:
*/
virtual boost::uint64_t read_register(const std::string &path, const boost::uint32_t field, const size_t mboard = 0) = 0;
- /*!
- * Enumerate the full paths of all low-level USRP register accessible to read/write
- * \param mboard the motherboard index 0 to M-1
- * \return a vector of register paths
- */
- virtual std::vector<std::string> enumerate_registers(const size_t mboard = 0) = 0;
-
/*******************************************************************
* Filter API methods
******************************************************************/