summaryrefslogtreecommitdiffstats
path: root/pcilib/pcilib.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-09-24 04:28:45 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-09-24 04:28:45 +0200
commit08a01723af9cd52c078d5ca6c38c34d375b39fa0 (patch)
tree6eadea9c67f4bb56a9e4ee09f4982efaf61deece /pcilib/pcilib.h
parent924adedb2928f5657c6668f606dbb3294b3c45da (diff)
parentae7f83a7948d8c3760f8019899a45e6ec90c2c6a (diff)
downloadpcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.tar.gz
pcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.tar.bz2
pcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.tar.xz
pcitool-08a01723af9cd52c078d5ca6c38c34d375b39fa0.zip
Finalyze XML support and provide initial support for views (only descriptions so far)
Diffstat (limited to 'pcilib/pcilib.h')
-rw-r--r--pcilib/pcilib.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/pcilib/pcilib.h b/pcilib/pcilib.h
index 6bb018d..8e55d00 100644
--- a/pcilib/pcilib.h
+++ b/pcilib/pcilib.h
@@ -13,6 +13,8 @@ typedef uint32_t pcilib_version_t;
typedef uint8_t pcilib_bar_t; /**< Type holding the PCI Bar number */
typedef uint16_t pcilib_register_t; /**< Type holding the register position within the field listing registers in the model */
+typedef uint16_t pcilib_view_t; /**< Type holding the register view position within view listing in the model */
+typedef uint16_t pcilib_unit_t; /**< Type holding the value unit position within unit listing in the model */
typedef uint32_t pcilib_register_addr_t; /**< Type holding the register address within address-space of BARs */
typedef uint8_t pcilib_register_size_t; /**< Type holding the size in bits of the register */
typedef uint32_t pcilib_register_value_t; /**< Type holding the register value */
@@ -39,6 +41,12 @@ typedef enum {
} pcilib_endianess_t;
typedef enum {
+ PCILIB_TYPE_STRING = 0, /**< char* */
+ PCILIB_TYPE_DOUBLE = 1, /**< double */
+ PCILIB_TYPE_LONG = 2
+} pcilib_data_type_t;
+
+typedef enum {
PCILIB_DMA_IRQ = 1,
PCILIB_EVENT_IRQ = 2
} pcilib_irq_type_t;
@@ -192,6 +200,9 @@ int pcilib_write_register_by_id(pcilib_t *ctx, pcilib_register_t reg, pcilib_reg
int pcilib_read_register(pcilib_t *ctx, const char *bank, const char *regname, pcilib_register_value_t *value);
int pcilib_write_register(pcilib_t *ctx, const char *bank, const char *regname, pcilib_register_value_t value);
+int pcilib_read_register_view(pcilib_t *ctx, const char *bank, const char *regname, const char *unit, pcilib_data_type_t value_type, size_t value_size, void *value);
+int pcilib_write_register_view(pcilib_t *ctx, const char *bank, const char *regname, const char *unit, pcilib_data_type_t value_type, size_t value_size, void *value);
+
int pcilib_reset(pcilib_t *ctx);
int pcilib_trigger(pcilib_t *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data);