summaryrefslogtreecommitdiffstats
path: root/pcilib/views.h
diff options
context:
space:
mode:
Diffstat (limited to 'pcilib/views.h')
-rw-r--r--pcilib/views.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/pcilib/views.h b/pcilib/views.h
index bdae9f4..98e3dcd 100644
--- a/pcilib/views.h
+++ b/pcilib/views.h
@@ -7,6 +7,8 @@ typedef struct pcilib_view_enum_s pcilib_view_enum_t;
typedef struct pcilib_view_formula_s pcilib_view_formula_t;
+typedef struct pcilib_view_enum2_s pcilib_view_enum2_t;
+
/**
* new type to define an enum view
*/
@@ -17,6 +19,15 @@ struct pcilib_view_enum_s {
/**
+ * complete type for an enum view : name will be changed after with the previous one
+ */
+struct pcilib_view_enum2_s {
+ const char* name;
+ pcilib_view_enum_t* enums_list;
+};
+
+
+/**
* new type to define a formula view
*/
struct pcilib_view_formula_s {
@@ -36,4 +47,9 @@ int pcilib_read_view(pcilib_t *ctx, const char *bank, const char *regname, const
*/
int pcilib_write_view(pcilib_t *ctx, const char *bank, const char *regname, const char *view/*, const char *unit*/, size_t value_size, void *value);
+int pcilib_add_views_enum(pcilib_t* ctx,size_t n, pcilib_view_enum2_t* views);
+
+int pcilib_add_views_formula(pcilib_t* ctx, size_t n, pcilib_view_formula_t* views);
+
+
#endif