Closed nminaylov closed 2 years ago
Thanks! Since before this, for my report implementation I needed to add additional items
#define HID_PAGE_CONSUMER 0x0C // Added for Multimedia since there is no
#define HID_CONSUMER_CONTROL 0x01 // hid_usage_consumer.h file
#define HID_LOGICAL_MAX16(a, b) HID_ITEM(HID_ITEM_TAG_LOGICAL_MAX, HID_ITEM_TYPE_GLOBAL, 2), a, b
#define HID_USAGE_MAX16(a, b) HID_ITEM(HID_ITEM_TAG_USAGE_MAX, HID_ITEM_TYPE_LOCAL, 2), a, b
const uint8_t HidReportDescCC[] = // (Multimedia only)
{
HID_USAGE_PAGE(HID_PAGE_CONSUMER), // 0x05, 0x0C, USAGE_PAGE (Consumer Page)
HID_USAGE(HID_CONSUMER_CONTROL), // 0x09, 0x01, USAGE (Consumer Control)
HID_COLLECTION(HID_APPLICATION_COLLECTION), // 0xa1, 0x01, COLLECTION (Application)
HID_REPORT_ID(1), // 0x85, 0x01, REPORT_ID (1)
HID_USAGE_MINIMUM(0), // 0x19, 0x00, USAGE_MINIMUM (Reserved (no event indicated))
HID_USAGE_MAX16(0x3C, 2), // 0x2A, 0x3C, 0x02, USAGE_MAXIMUM (AC Format)
HID_LOGICAL_MINIMUM(0), // 0x15, 0x00, LOGICAL_MINIMUM (0)
HID_LOGICAL_MAX16(0x3C, 2), // 0x26, 0x3C, 0x02, LOGICAL_MAXIMUM (572)
HID_REPORT_COUNT(1), // 0x95, 0x01, REPORT_COUNT (1 of = 2 bytes)
HID_REPORT_SIZE(16), // 0x75, 0x10, REPORT_SIZE (16 bits)
HID_INPUT(HID_IOF_DATA|HID_IOF_ARRAY|HID_IOF_ABSOLUTE), // 0x81, 0x00, // INPUT (Data,Array,Abs)
HID_END_COLLECTION // 0xc0 END_COLLECTION
};
Added one more HID usage table. Contains some useful media key codes