-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathHIDReports.cpp
executable file
·19 lines (17 loc) · 1.05 KB
/
HIDReports.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "USBComposite.h"
#define REPORT(name, ...) \
static uint8_t raw_ ## name[] = { __VA_ARGS__ }; \
static const HIDReportDescriptor desc_ ## name = { raw_ ##name, sizeof(raw_ ##name) }; \
const HIDReportDescriptor* hidReport ## name = & desc_ ## name;
REPORT(KeyboardMouseJoystick, HID_MOUSE_REPORT_DESCRIPTOR(), HID_KEYBOARD_REPORT_DESCRIPTOR(), HID_JOYSTICK_REPORT_DESCRIPTOR());
REPORT(KeyboardMouse, HID_MOUSE_REPORT_DESCRIPTOR(), HID_KEYBOARD_REPORT_DESCRIPTOR());
REPORT(Keyboard, HID_KEYBOARD_REPORT_DESCRIPTOR());
REPORT(Mouse, HID_MOUSE_REPORT_DESCRIPTOR());
REPORT(AbsMouse, HID_ABS_MOUSE_REPORT_DESCRIPTOR());
REPORT(KeyboardJoystick, HID_KEYBOARD_REPORT_DESCRIPTOR(), HID_JOYSTICK_REPORT_DESCRIPTOR());
REPORT(Joystick, HID_JOYSTICK_REPORT_DESCRIPTOR());
REPORT(BootKeyboard, HID_BOOT_KEYBOARD_REPORT_DESCRIPTOR());
REPORT(Consumer, HID_CONSUMER_REPORT_DESCRIPTOR());
REPORT(Desktop, HID_DESKTOP_REPORT_DESCRIPTOR());
REPORT(Digitizer, HID_DIGITIZER_REPORT_DESCRIPTOR());
REPORT(SwitchController, HID_SWITCH_CONTROLLER_REPORT_DESCRIPTOR());