summaryrefslogtreecommitdiffstats
path: root/pcilib.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-09 05:33:18 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-09 05:33:18 +0200
commit02924fc49641ca9c000054a7a540b6f1eaa0e8f8 (patch)
tree986ba532752d7e19d85f77eea57f15579fe913d5 /pcilib.h
parent80d999195b2b1896fcd1878a44b0ece474fe678c (diff)
downloadpcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.tar.gz
pcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.tar.bz2
pcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.tar.xz
pcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.zip
Support dynamic registers, support register offsets and multiregisters (bitmasks), list NWL DMA registers
Diffstat (limited to 'pcilib.h')
-rw-r--r--pcilib.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/pcilib.h b/pcilib.h
index 314cca7..6f831fa 100644
--- a/pcilib.h
+++ b/pcilib.h
@@ -28,7 +28,7 @@ typedef unsigned long pcilib_irq_source_t;
typedef uint8_t pcilib_bar_t; /**< Type holding the PCI Bar number */
typedef uint8_t pcilib_register_t; /**< Type holding the register ID within the Bank */
-typedef uint8_t pcilib_register_addr_t; /**< Type holding the register ID within the Bank */
+typedef uint32_t pcilib_register_addr_t; /**< Type holding the register ID within the Bank */
typedef uint8_t pcilib_register_bank_t; /**< Type holding the register bank number */
typedef uint8_t pcilib_register_bank_addr_t; /**< Type holding the register bank number */
typedef uint8_t pcilib_register_size_t; /**< Type holding the size in bits of the register */
@@ -53,7 +53,9 @@ typedef enum {
typedef enum {
PCILIB_REGISTER_R = 1,
PCILIB_REGISTER_W = 2,
- PCILIB_REGISTER_RW = 3
+ PCILIB_REGISTER_RW = 3,
+ PCILIB_REGISTER_W1C = 4, /**< writting 1 resets the flag */
+ PCILIB_REGISTER_RW1C = 5
} pcilib_register_mode_t;
typedef enum {
@@ -72,7 +74,8 @@ typedef enum {
typedef enum {
PCILIB_REGISTER_STANDARD = 0,
- PCILIB_REGISTER_FIFO
+ PCILIB_REGISTER_FIFO,
+ PCILIB_REGISTER_BITS
} pcilib_register_type_t;
#define PCILIB_BAR_DETECT ((pcilib_bar_t)-1)
@@ -126,6 +129,7 @@ typedef struct {
pcilib_register_size_t offset;
pcilib_register_size_t bits;
pcilib_register_value_t defvalue;
+ pcilib_register_value_t rwmask; /**< 1 - read before write bits, 0 - zero should be written to preserve value */
pcilib_register_mode_t mode;
pcilib_register_type_t type;
@@ -185,10 +189,6 @@ typedef struct {
pcilib_event_api_description_t *event_api;
} pcilib_model_description_t;
-#ifndef _PCILIB_PCI_C
-extern pcilib_model_description_t pcilib_model[];
-#endif /* ! _PCILIB_PCI_C */
-
int pcilib_set_error_handler(void (*err)(const char *msg, ...), void (*warn)(const char *msg, ...));
pcilib_model_t pcilib_get_model(pcilib_t *ctx);