summaryrefslogtreecommitdiffstats
path: root/pcilib.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-04-14 04:21:38 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-04-14 04:21:38 +0200
commitb70ed8b6ccf17a7c5b4339f05a33471eaf3b33e5 (patch)
treea608941197e4ea1fa87a47cad013e3a7c768ca41 /pcilib.h
parent0d9e1cfca235f68e55a4d81e60409110b8ccde41 (diff)
downloadipecamera-b70ed8b6ccf17a7c5b4339f05a33471eaf3b33e5.tar.gz
ipecamera-b70ed8b6ccf17a7c5b4339f05a33471eaf3b33e5.tar.bz2
ipecamera-b70ed8b6ccf17a7c5b4339f05a33471eaf3b33e5.tar.xz
ipecamera-b70ed8b6ccf17a7c5b4339f05a33471eaf3b33e5.zip
Support non-callback way of getting events
Diffstat (limited to 'pcilib.h')
-rw-r--r--pcilib.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/pcilib.h b/pcilib.h
index cde33d3..360b9a0 100644
--- a/pcilib.h
+++ b/pcilib.h
@@ -69,7 +69,8 @@ typedef enum {
#define PCILIB_EVENT2 4
#define PCILIB_EVENT3 8
#define PCILIB_EVENTS_ALL ((pcilib_event_t)-1)
-#define PCILIB_EVENT_INVALID ((pcilib_event_t)-1)
+#define PCILIB_EVENT_INVALID ((pcilib_event_t)-1)
+#define PCILIB_EVENT_ID_INVALID 0
typedef struct {
pcilib_register_bank_addr_t addr;
@@ -132,6 +133,8 @@ typedef struct {
int (*start)(void *ctx, pcilib_event_t event_mask, pcilib_callback_t callback, void *user);
int (*stop)(void *ctx);
int (*trigger)(void *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data);
+
+ pcilib_event_id_t (*next_event)(void *ctx, pcilib_event_t event_mask);
void* (*get_data)(void *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)(void *ctx, pcilib_event_id_t event_id);
} pcilib_event_api_description_t;
@@ -185,6 +188,7 @@ int pcilib_stop(pcilib_t *ctx);
int pcilib_trigger(pcilib_t *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data);
+pcilib_event_id_t pcilib_get_next_event(pcilib_t *ctx, pcilib_event_t event_mask);
void *pcilib_get_data(pcilib_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, size_t *size);
void *pcilib_get_data_with_argument(pcilib_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, size_t arg_size, void *arg, size_t *size);
/*