blob: 07d6bebc871e9b67ce156d79ab7a2417da1ab26a (
plain)
1
2
3
4
5
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
33
34
35
36
37
|
#include "devdetails.h"
#include <pthread.h>
#include <string.h>
#include <assert.h>
#include <stdbool.h>
#include <libusb-1.0/libusb.h>
// #include <stdlib.h>
// #include <stdio.h>
#include <hidapi/hidapi.h>
#include <pthread.h>
#include "util.h"
#define IMAGE_REPORT_LENGTH 8191
#define VENDOR_INFO 0x0fd9
#define MINIPRODUCTID 0x0063
/* may or may not use these. Might use enumerations */
// #define STREAMDECK_ORIG 1
// #define STREAMDECK_MINI 2
typedef struct Image image;
typedef struct Key key;
typedef struct Screen screen;
typedef struct Streamdeck streamdeck;
typedef struct Handler handler;
enum numkeys {STREAMDECK_ORIG = 12, STREAMDECK_MINI = 6};
streamdeck* connect();
int close();
int reset(handler* deck);
int resetkeystream(handler* deck);
int callback(handler* deck, void* key, void* state);
int readhandler(handler* deck);
int set_key_image(streamdeck* deck, int key, image* img);
int init ();
|