epc_usb.h 651 Bytes
Newer Older
swym's avatar
swym committed
1
2
3
4
#ifndef EPICARDIUM_USB_EPC_USB_H_INCLUDED
#define EPICARDIUM_USB_EPC_USB_H_INCLUDED

/**
Rahix's avatar
Rahix committed
5
 *
swym's avatar
swym committed
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
 * EPC - it's not just a Universal Serial Bus,
 * it's an Epic Serial Bus!
 */


#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

struct esb_config;
typedef int (*esb_cfg_handler)(struct esb_config* self);

struct esb_config {
    const char* name;
    esb_cfg_handler init;
    esb_cfg_handler configure;
    esb_cfg_handler deconfigure;
    esb_cfg_handler deinit;

    struct esb_device_descriptors* descriptors;
    void* deviceData;
};

int esb_init(struct esb_config* cfg);
void esb_deinit(void);

#endif//EPICARDIUM_USB_EPC_USB_H_INCLUDED