summaryrefslogtreecommitdiffstats
path: root/pcilib.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-18 01:07:04 +0200
committerSuren A. Chilingaryan <csa@dside.dyndns.org>2011-07-18 01:07:04 +0200
commit51b53a89896a63d49e7e622133faf58dc681ce13 (patch)
tree0af640d5818651d5bf474b1fbc976f821290694b /pcilib.h
parent71c759e3fa6fb725c51e3800947848cd549222bf (diff)
downloadipecamera-51b53a89896a63d49e7e622133faf58dc681ce13.tar.gz
ipecamera-51b53a89896a63d49e7e622133faf58dc681ce13.tar.bz2
ipecamera-51b53a89896a63d49e7e622133faf58dc681ce13.tar.xz
ipecamera-51b53a89896a63d49e7e622133faf58dc681ce13.zip
Change timeout definition in Events API from struct timespec to pcilib_timeout_t
Diffstat (limited to 'pcilib.h')
-rw-r--r--pcilib.h13
1 files changed, 3 insertions, 10 deletions
diff --git a/pcilib.h b/pcilib.h
index 01afe9e..07f558a 100644
--- a/pcilib.h
+++ b/pcilib.h
@@ -4,16 +4,8 @@
#define PCILIB_MAX_BANKS 6
#define PCILIB_MAX_DMA_ENGINES 32
-#include <time.h>
#include <stdint.h>
-#ifndef __timespec_defined
-struct timespec {
- time_t tv_sec;
- long tv_nsec;
-};
-#endif /* __timespec_defined */
-
#define pcilib_memcpy pcilib_memcpy32
#define pcilib_datacpy pcilib_datacpy32
@@ -106,6 +98,7 @@ typedef enum {
#define PCILIB_EVENT_ID_INVALID 0
#define PCILIB_TIMEOUT_INFINITE ((pcilib_timeout_t)-1)
#define PCILIB_TIMEOUT_IMMEDIATE 0
+#define PCILIB_TIMEOUT_TRIGGER 0
typedef int (*pcilib_dma_callback_t)(void *ctx, pcilib_dma_flags_t flags, size_t bufsize, void *buf);
typedef int (*pcilib_event_callback_t)(pcilib_event_t event, pcilib_event_id_t event_id, void *user);
@@ -254,7 +247,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, const struct timespec *timeout);
+pcilib_event_id_t pcilib_get_next_event(pcilib_t *ctx, pcilib_event_t event_mask, pcilib_timeout_t timeout);
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);
/*
@@ -268,6 +261,6 @@ int pcilib_return_data(pcilib_t *ctx, pcilib_event_id_t event_id);
* In case of failure the content of data is undefined.
* @param timeout - will be autotriggered if NULL
*/
-int pcilib_grab(pcilib_t *ctx, pcilib_event_t event_mask, size_t *size, void **data, const struct timespec *timeout);
+int pcilib_grab(pcilib_t *ctx, pcilib_event_t event_mask, size_t *size, void **data, pcilib_timeout_t timeout);
#endif /* _PCITOOL_PCILIB_H */