summaryrefslogtreecommitdiffstats
path: root/events.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2023-05-25 22:41:04 +0200
committerSuren A. Chilingaryan <csa@suren.me>2023-05-25 22:41:04 +0200
commit6f4af841f6fdd099b97d071ae64c8be60f809456 (patch)
treed4f9a18b38e1ce3cfc0a5336215d5ce3afe830d2 /events.h
downloadpcidev-6f4af841f6fdd099b97d071ae64c8be60f809456.tar.gz
pcidev-6f4af841f6fdd099b97d071ae64c8be60f809456.tar.bz2
pcidev-6f4af841f6fdd099b97d071ae64c8be60f809456.tar.xz
pcidev-6f4af841f6fdd099b97d071ae64c8be60f809456.zip
A sample event engine for pcitool (not requiring any PCIe hardware). Initial (barely tested and intended only as an example) release
Diffstat (limited to 'events.h')
-rw-r--r--events.h24
1 files changed, 24 insertions, 0 deletions
diff --git a/events.h b/events.h
new file mode 100644
index 0000000..5d09d74
--- /dev/null
+++ b/events.h
@@ -0,0 +1,24 @@
+#ifndef _PCIDEV_EVENTS_H
+#define _PCIDEV_EVENTS_H
+
+#include <stdio.h>
+
+#include <pcilib.h>
+#include "pcidev.h"
+
+pcilib_context_t *pcidev_init(pcilib_t *pcilib);
+void pcidev_free(pcilib_context_t *ctx);
+
+pcilib_dma_context_t *pcidev_init_dma(pcilib_context_t *ctx);
+
+int pcidev_reset(pcilib_context_t *ctx);
+int pcidev_start(pcilib_context_t *ctx, pcilib_event_t event_mask, pcilib_event_flags_t flags);
+int pcidev_stop(pcilib_context_t *ctx, pcilib_event_flags_t flags);
+int pcidev_trigger(pcilib_context_t *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data);
+int pcidev_stream(pcilib_context_t *vctx, pcilib_event_callback_t callback, void *user);
+//int pcidev_next_event(pcilib_context_t *vctx, pcilib_timeout_t timeout, pcilib_event_id_t *evid, size_t info_size, pcilib_event_info_t *info);
+
+int pcidev_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, void **buf);
+int pcidev_return_data(pcilib_context_t *ctx, pcilib_event_id_t event_id, pcilib_event_data_type_t data_type, void *data);
+
+#endif /* _PCIDEV_EVENTS_H */