-
Notifications
You must be signed in to change notification settings - Fork 1
/
usbemani.h
60 lines (50 loc) · 1.22 KB
/
usbemani.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#pragma once
#include <avr/io.h>
#include <avr/wdt.h>
#include <avr/power.h>
#include <avr/interrupt.h>
#include <stdbool.h>
#include <string.h>
#include "descriptors.h"
#include <LUFA/Platform/Platform.h>
typedef enum {
USBEMANI_COMMAND_RESET = 0xF5,
} USBEMANI_COMMAND;
typedef struct {
int16_t Wheel;
int16_t Z;
int16_t RZ;
uint16_t Button;
int8_t LX;
int8_t LY;
int8_t RX;
int8_t RY;
int16_t Slider;
int16_t Dial;
} USBemani_Input_t;
typedef struct {
uint16_t Lights;
uint8_t Command;
uint8_t Data;
} USBemani_Output_t;
void SetupHardware(void);
void SetupEffects(void);
void HID_Task(void);
void EVENT_USB_Device_Connect(void);
void EVENT_USB_Device_Disconnect(void);
void EVENT_USB_Device_ConfigurationChanged(void);
void EVENT_USB_Device_ControlRequest(void);
void EVENT_USB_Device_StartOfFrame(void);
void ProcessOutputReport(USBemani_Output_t *Report);
void CreateInputReport(USBemani_Input_t *Report);
void BuildInputReport(USBemani_Input_t *Report);
#include "input.h"
#include "input_list.h"
#include "output_list.h"
#include "color.h"
#include "color_provider.h"
#include "effect.h"
#include "effect_deferer.h"
#include "rgb.h"
#include "ps2.h"
#include "config.h"