From d98d86bd6b0d861462698e5bcfc8f712f8e350c7 Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 6 Jul 2011 02:10:24 +0200 Subject: Support FIFO reading/writting, code restructurization, few fixes --- event.h | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 event.h (limited to 'event.h') diff --git a/event.h b/event.h new file mode 100644 index 0000000..b60fc29 --- /dev/null +++ b/event.h @@ -0,0 +1,22 @@ +#ifndef _PCILIB_EVENT_H +#define _PCILIB_EVENT_H + +#include "pcilib.h" + +struct pcilib_event_api_description_s { + pcilib_context_t *(*init)(pcilib_t *ctx); + void (*free)(pcilib_context_t *ctx); + + int (*reset)(pcilib_context_t *ctx); + + int (*start)(pcilib_context_t *ctx, pcilib_event_t event_mask, pcilib_callback_t callback, void *user); + int (*stop)(pcilib_context_t *ctx); + int (*trigger)(pcilib_context_t *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data); + + pcilib_event_id_t (*next_event)(pcilib_context_t *ctx, pcilib_event_t event_mask, const struct timespec *timeout); + void* (*get_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, size_t arg_size, void *arg, size_t *size); + int (*return_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id); +}; + + +#endif /* _PCILIB_EVENT_H */ -- cgit v1.2.3