/alps/pcitool

To get this branch, use:
bzr branch http://suren.me/webbzr/alps/pcitool

« back to all changes in this revision

Viewing changes to pcilib/bank.h

  • Committer: Suren A. Chilingaryan
  • Date: 2015-09-10 03:08:04 UTC
  • mfrom: (277.2.17 test_xml)
  • Revision ID: csa@suren.me-20150910030804-djti3wcmk4yubhp7
Initial integration of XML support

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
typedef uint8_t pcilib_register_protocol_t;                                     /**< Type holding the protocol position within the field listing register protocols in the model */
24
24
typedef uint8_t pcilib_register_protocol_addr_t;                                /**< Type holding the protocol address */
25
25
 
26
 
 
27
26
typedef struct pcilib_register_bank_context_s pcilib_register_bank_context_t;
28
27
 
 
28
typedef enum {
 
29
    PCILIB_MODEL_MODIFICATON_FLAGS_DEFAULT = 0,
 
30
    PCILIB_MODEL_MODIFICATION_FLAG_OVERRIDE = 1,                                /**< Instructs to override the existing registers/banks/etc... */
 
31
    PCILIB_MODEL_MODIFICATION_FLAG_SKIP_EXISTING = 2                            /**< If flag is set, pcilib will just skip existing registers/banks/etc instead of reporting a error */
 
32
} pcilib_model_modification_flags_t;
 
33
 
29
34
typedef struct {
30
35
    pcilib_version_t version;
31
36
 
84
89
struct pcilib_register_bank_context_s {
85
90
    const pcilib_register_bank_description_t *bank;                             /**< Corresponding bank description */
86
91
    const pcilib_register_protocol_api_description_t *api;                      /**< API functions */
 
92
    pcilib_xml_node_t *xml;                                                     /**< Additional XML properties */
87
93
};
88
94
 
89
95
#ifdef __cplusplus
94
100
int pcilib_init_register_banks(pcilib_t *ctx);
95
101
void pcilib_free_register_banks(pcilib_t *ctx);
96
102
 
97
 
int pcilib_add_register_banks(pcilib_t *ctx, size_t n, const pcilib_register_bank_description_t *banks);
98
 
int pcilib_add_register_protocols(pcilib_t *ctx, size_t n, const pcilib_register_protocol_description_t *protocols);
99
 
int pcilib_add_register_ranges(pcilib_t *ctx, size_t n, const pcilib_register_range_t *ranges);
 
103
int pcilib_add_register_banks(pcilib_t *ctx, pcilib_model_modification_flags_t flags, size_t n, const pcilib_register_bank_description_t *banks, pcilib_register_bank_t *ids);
 
104
int pcilib_add_register_protocols(pcilib_t *ctx, pcilib_model_modification_flags_t flags, size_t n, const pcilib_register_protocol_description_t *protocols, pcilib_register_protocol_t *ids);
 
105
int pcilib_add_register_ranges(pcilib_t *ctx, pcilib_model_modification_flags_t flags, size_t n, const pcilib_register_range_t *ranges);
100
106
 
101
107
pcilib_register_bank_t pcilib_find_register_bank_by_addr(pcilib_t *ctx, pcilib_register_bank_addr_t bank);
102
108
pcilib_register_bank_t pcilib_find_register_bank_by_name(pcilib_t *ctx, const char *bankname);