summaryrefslogtreecommitdiffstats
path: root/event.h
blob: 720271ca1e2de57bc25c5a587246730608e6485b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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_event_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 */