aboutsummaryrefslogtreecommitdiffstats
path: root/host/include
diff options
context:
space:
mode:
authorNicholas Corgan <nick.corgan@ettus.com>2015-08-14 08:03:00 -0700
committerMartin Braun <martin.braun@ettus.com>2015-08-14 12:30:53 -0700
commit8d6b63e1e86ae0f1ee8b084ea2db6d5b5b705179 (patch)
tree9487ff8ed4cc5a814c825ee6885a7886e581800c /host/include
parent9b51e4cfbe0aefa4e7ff3a64b15b22ec30a0a5e3 (diff)
downloaduhd-8d6b63e1e86ae0f1ee8b084ea2db6d5b5b705179.tar.gz
uhd-8d6b63e1e86ae0f1ee8b084ea2db6d5b5b705179.tar.bz2
uhd-8d6b63e1e86ae0f1ee8b084ea2db6d5b5b705179.zip
C API: added soft register API
Diffstat (limited to 'host/include')
-rw-r--r--host/include/uhd/usrp/usrp.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/host/include/uhd/usrp/usrp.h b/host/include/uhd/usrp/usrp.h
index ab9c4d28f..1bde694b4 100644
--- a/host/include/uhd/usrp/usrp.h
+++ b/host/include/uhd/usrp/usrp.h
@@ -36,6 +36,13 @@
#include <stdint.h>
#include <time.h>
+//! Register info
+typedef struct {
+ size_t bitwidth;
+ bool readable;
+ bool writable;
+} uhd_usrp_register_info_t;
+
/*
* Streamers
*/
@@ -1105,6 +1112,39 @@ UHD_API uhd_error uhd_usrp_get_gpio_attr(
uint32_t *attr_out
);
+//! Enumerate the full paths of USRP registers available for read/write
+UHD_API uhd_error uhd_usrp_enumerate_registers(
+ uhd_usrp_handle h,
+ size_t mboard,
+ uhd_string_vector_handle *registers_out
+);
+
+//! Get more information about a low-level device register
+UHD_API uhd_error uhd_usrp_get_register_info(
+ uhd_usrp_handle h,
+ const char* path,
+ size_t mboard,
+ uhd_usrp_register_info_t *register_info_out
+);
+
+//! Write a low-level register field for a device register in the USRP hardware
+UHD_API uhd_error uhd_usrp_write_register(
+ uhd_usrp_handle h,
+ const char* path,
+ uint32_t field,
+ uint64_t value,
+ size_t mboard
+);
+
+//! Read a low-level register field from a device register in the USRP hardware
+UHD_API uhd_error uhd_usrp_read_register(
+ uhd_usrp_handle h,
+ const char* path,
+ uint32_t field,
+ size_t mboard,
+ uint64_t *value_out
+);
+
#ifdef __cplusplus
}
#endif