diff options
Diffstat (limited to 'views/enum.h')
-rw-r--r-- | views/enum.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/views/enum.h b/views/enum.h new file mode 100644 index 0000000..eb90810 --- /dev/null +++ b/views/enum.h @@ -0,0 +1,23 @@ +#ifndef _PCILIB_VIEW_ENUM_H +#define _PCILIB_VIEW_ENUM_H + +#include <pcilib.h> +#include <pcilib/view.h> + +typedef struct { + pcilib_register_value_t value, min, max; /**< the value or value-range for which the name is defined, while wrtiting the name the value will be used even if range is specified */ + const char *name; /**< corresponding string to value */ +} pcilib_value_name_t; + +typedef struct { + pcilib_view_description_t base; + pcilib_value_name_t *names; +} pcilib_enum_view_description_t; + + +#ifndef _PCILIB_VIEW_ENUM_C +extern const pcilib_view_api_description_t pcilib_enum_view_static_api; +extern const pcilib_view_api_description_t pcilib_enum_view_xml_api; +#endif /* _PCILIB_VIEW_ENUM_C */ + +#endif /* _PCILIB_VIEW_ENUM_H */ |