From 2722e76f513ba7be80e63f1f49f2095d39759f09 Mon Sep 17 00:00:00 2001 From: zilio nicolas Date: Thu, 10 Sep 2015 20:40:15 +0200 Subject: more towards views --- pcilib/views.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'pcilib/views.h') 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 */ @@ -16,6 +18,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 */ @@ -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 -- cgit v1.2.3