diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-06 02:10:24 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-06 02:10:24 +0200 |
commit | d98d86bd6b0d861462698e5bcfc8f712f8e350c7 (patch) | |
tree | 54ca00b323495f7b36f7eef479e7d1c0c2e6905a /event.h | |
parent | 9b9e573479732acb1b9dc9fd4d6444918b5b5a5b (diff) | |
download | pcitool-d98d86bd6b0d861462698e5bcfc8f712f8e350c7.tar.gz pcitool-d98d86bd6b0d861462698e5bcfc8f712f8e350c7.tar.bz2 pcitool-d98d86bd6b0d861462698e5bcfc8f712f8e350c7.tar.xz pcitool-d98d86bd6b0d861462698e5bcfc8f712f8e350c7.zip |
Support FIFO reading/writting, code restructurization, few fixes
Diffstat (limited to 'event.h')
-rw-r--r-- | event.h | 22 |
1 files changed, 22 insertions, 0 deletions
@@ -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 */ |