32 lines
538 B
C
32 lines
538 B
C
#pragma once
|
|
|
|
#include <windows.h>
|
|
|
|
#include <stdint.h>
|
|
|
|
enum {
|
|
/* System buttons in button[0] */
|
|
|
|
USIO_BUTTON_TEST = 1 << 9,
|
|
USIO_BUTTON_SERVICE = 1 << 6,
|
|
};
|
|
|
|
struct usio_config {
|
|
bool enable;
|
|
};
|
|
|
|
struct usio_state {
|
|
uint16_t adcs[8];
|
|
uint16_t spinners[4];
|
|
uint16_t chutes[2];
|
|
uint16_t buttons[2];
|
|
};
|
|
|
|
struct usio_ops {
|
|
HRESULT (*poll)(void *ctx, struct usio_state *state);
|
|
};
|
|
|
|
HRESULT usio_hook_init(
|
|
const struct usio_config *cfg,
|
|
const struct usio_ops *ops,
|
|
void *ctx); |