summaryrefslogtreecommitdiffstats
path: root/pcilib/views.h
diff options
context:
space:
mode:
authorzilio nicolas <nicolas.zilio@kit.edu>2015-09-10 20:40:15 +0200
committerzilio nicolas <nicolas.zilio@kit.edu>2015-09-10 20:40:15 +0200
commit2722e76f513ba7be80e63f1f49f2095d39759f09 (patch)
treef6658894864616633564c1fb0990edad9d677da4 /pcilib/views.h
parent9bcd0b7b98dfb10d054913dad34313391f6029f2 (diff)
downloadpcitool-2722e76f513ba7be80e63f1f49f2095d39759f09.tar.gz
pcitool-2722e76f513ba7be80e63f1f49f2095d39759f09.tar.bz2
pcitool-2722e76f513ba7be80e63f1f49f2095d39759f09.tar.xz
pcitool-2722e76f513ba7be80e63f1f49f2095d39759f09.zip
more towards views
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