From f13867f64fcba24ef2cb9d726b5ee1082ac1a8b9 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Fri, 9 Oct 2015 04:42:53 +0200 Subject: Implement enum view --- pcilib/view.h | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'pcilib/view.h') diff --git a/pcilib/view.h b/pcilib/view.h index 4af4c00..9d3d32d 100644 --- a/pcilib/view.h +++ b/pcilib/view.h @@ -1,6 +1,8 @@ #ifndef _PCILIB_VIEW_H #define _PCILIB_VIEW_H +#include + #include #include @@ -19,7 +21,7 @@ typedef struct { pcilib_view_context_t *(*init)(pcilib_t *ctx); void (*free)(pcilib_t *ctx, pcilib_view_context_t *view); void (*free_description)(pcilib_t *ctx, pcilib_view_description_t *view); - int (*read_from_reg)(pcilib_t *ctx, pcilib_view_context_t *view, const pcilib_register_value_t *regval, pcilib_value_t *val); + int (*read_from_reg)(pcilib_t *ctx, pcilib_view_context_t *view, pcilib_register_value_t regval, pcilib_value_t *val); int (*write_to_reg)(pcilib_t *ctx, pcilib_view_context_t *view, pcilib_register_value_t *regval, const pcilib_value_t *val); } pcilib_view_api_description_t; @@ -32,6 +34,12 @@ struct pcilib_view_description_s { const char *description; /**< Short description */ }; +struct pcilib_view_context_s { + const char *name; + pcilib_view_t view; + UT_hash_handle hh; +}; + #ifdef __cplusplus extern "C" { #endif -- cgit v1.2.3