bzr branch
http://suren.me/webbzr/alps/pcitool
47
by Suren A. Chilingaryan
Support FIFO reading/writting, code restructurization, few fixes |
1 |
#ifndef _PCILIB_EVENT_H
|
2 |
#define _PCILIB_EVENT_H
|
|
3 |
||
4 |
#include "pcilib.h" |
|
5 |
||
6 |
struct pcilib_event_api_description_s { |
|
7 |
pcilib_context_t *(*init)(pcilib_t *ctx); |
|
8 |
void (*free)(pcilib_context_t *ctx); |
|
9 |
||
10 |
int (*reset)(pcilib_context_t *ctx); |
|
11 |
||
117
by Suren A. Chilingaryan
new event architecture, first trial |
12 |
int (*start)(pcilib_context_t *ctx, pcilib_event_t event_mask, pcilib_event_flags_t flags); |
13 |
int (*stop)(pcilib_context_t *ctx, pcilib_event_flags_t flags); |
|
47
by Suren A. Chilingaryan
Support FIFO reading/writting, code restructurization, few fixes |
14 |
int (*trigger)(pcilib_context_t *ctx, pcilib_event_t event, size_t trigger_size, void *trigger_data); |
15 |
||
117
by Suren A. Chilingaryan
new event architecture, first trial |
16 |
int (*stream)(pcilib_context_t *ctx, pcilib_event_callback_t callback, void *user); |
17 |
pcilib_event_id_t (*next_event)(pcilib_context_t *ctx, pcilib_timeout_t timeout, pcilib_event_id_t *evid, pcilib_event_info_t **info); |
|
18 |
||
19 |
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, void *data); |
|
20 |
int (*return_data)(pcilib_context_t *ctx, pcilib_event_id_t event_id, void *data); |
|
70
by Suren A. Chilingaryan
Support modifications of DMA engine and allow DMA customizations by Event engine |
21 |
|
22 |
pcilib_dma_context_t *(*init_dma)(pcilib_context_t *ctx); |
|
117
by Suren A. Chilingaryan
new event architecture, first trial |
23 |
};
|
24 |
||
25 |
||
26 |
typedef struct { |
|
27 |
size_t max_events; |
|
28 |
pcilib_timeout_t duration; |
|
29 |
} pcilib_autostop_parameters_t; |
|
30 |
||
31 |
typedef struct { |
|
32 |
pcilib_event_rawdata_callback_t callback; |
|
33 |
void *user; |
|
34 |
} pcilib_rawdata_parameters_t; |
|
35 |
||
36 |
typedef struct { |
|
37 |
pcilib_autostop_parameters_t autostop; |
|
38 |
pcilib_rawdata_parameters_t rawdata; |
|
39 |
} pcilib_event_parameters_t; |
|
40 |
||
41 |
struct pcilib_event_context_s { |
|
42 |
pcilib_event_parameters_t params; |
|
43 |
pcilib_t *pcilib; |
|
44 |
};
|
|
45 |
||
46 |
||
47 |
int pcilib_init_event_engine(pcilib_t *ctx); |
|
47
by Suren A. Chilingaryan
Support FIFO reading/writting, code restructurization, few fixes |
48 |
|
49 |
#endif /* _PCILIB_EVENT_H */ |