Open FFBoard
Open source force feedback firmware
Loading...
Searching...
No Matches
usb_hid_gamepad.c
Go to the documentation of this file.
1/*
2 * usb_hid_gamepad.c
3 *
4 * Created on: 30.11.2022
5 * Author: Yannick
6 */
7
8#include "cppmain.h"
9#include "ffb_defs.h"
10#include "usb_hid_ffb_desc.h"
11
12#ifdef FFB_HID_DESC_GAMEPAD
13
17__ALIGN_BEGIN const uint8_t hid_gamepad_desc[USB_HID_GAMEPAD_REPORT_DESC_SIZE] __ALIGN_END =
18{
19 0x05, 0x01, /* USAGE_PAGE (Generic Desktop)*/
20 0x09, 0x04, /* USAGE (Joystick)*/
21 0xa1, 0x01, /* COLLECTION (Application)*/
22 HIDDESC_GAMEPAD_16B,
23
24 HIDDESC_CTRL_REPORTS, // HID command report support
25
26 0xC0 /* END_COLLECTION */
27};
28
29#endif
30
31#ifdef FFB_HID_DESC_GAMEPAD_32B
32
36__ALIGN_BEGIN const uint8_t hid_gamepad_desc_32b[USB_HID_GAMEPAD_REPORT_DESC_32B_SIZE] __ALIGN_END =
37{
38 0x05, 0x01, /* USAGE_PAGE (Generic Desktop)*/
39 0x09, 0x04, /* USAGE (Joystick)*/
40 0xa1, 0x01, /* COLLECTION (Application)*/
41 HIDDESC_GAMEPAD_32B,
42
43 HIDDESC_CTRL_REPORTS, // HID command report support
44
45 0xC0 /* END_COLLECTION */
46};
47
48#endif
const uint8_t hid_gamepad_desc_32b[USB_HID_GAMEPAD_REPORT_DESC_32B_SIZE]
const uint8_t hid_gamepad_desc[USB_HID_GAMEPAD_REPORT_DESC_SIZE]
__ALIGN_BEGIN const uint8_t hid_1ffb_desc[USB_HID_1FFB_REPORT_DESC_SIZE] __ALIGN_END