diff options
author | nicolas.zilio@hotmail.fr <> | 2015-09-14 18:18:00 +0200 |
---|---|---|
committer | nicolas.zilio@hotmail.fr <> | 2015-09-14 18:18:00 +0200 |
commit | de589562bd91cc60ee3e2d739bdd7a03063d38f7 (patch) | |
tree | 0ceb314dd240c1780d7cd0adf4fad99d69445ba3 /pcilib/views.h | |
parent | a1bf5e300e2345b642d0a13e7e26d22c56156e47 (diff) | |
download | pcitool-de589562bd91cc60ee3e2d739bdd7a03063d38f7.tar.gz pcitool-de589562bd91cc60ee3e2d739bdd7a03063d38f7.tar.bz2 pcitool-de589562bd91cc60ee3e2d739bdd7a03063d38f7.tar.xz pcitool-de589562bd91cc60ee3e2d739bdd7a03063d38f7.zip |
first try with pcilib_operation_t
Diffstat (limited to 'pcilib/views.h')
-rw-r--r-- | pcilib/views.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/pcilib/views.h b/pcilib/views.h index 33bcf4c..c7dee6b 100644 --- a/pcilib/views.h +++ b/pcilib/views.h @@ -10,6 +10,12 @@ typedef struct pcilib_view_formula_s pcilib_view_formula_t; typedef struct pcilib_view_enum2_s pcilib_view_enum2_t; +typedef struct pcilib_view_s pcilib_view_t; + +typedef struct pcilib_formula_s pcilib_formula_t; + +typedef int (*pcilib_view_operation_t)(pcilib_t *ctx, void *params, char* string, int read_or_write, pcilib_register_value_t *regval, size_t viewval_size, void* viewval); + /** * new type to define an enum view */ @@ -18,6 +24,10 @@ struct pcilib_view_enum_s { pcilib_register_value_t value, min, max; }; +struct pcilib_formula_s{ + char* read_formula; + char* write_formula; +}; /** * complete type for an enum view : name will be changed after with the previous one @@ -28,7 +38,14 @@ struct pcilib_view_enum2_s { const char* description; }; - +struct pcilib_view_s{ + const char* name; + const char* description; + pcilib_view_operation_t op; + void* parameters; + pcilib_unit_t base_unit; +}; + /** * new type to define a formula view */ |