Removed USB_HID_REPORT_ID_CONSUMER as per review.

This commit is contained in:
Angel Cascarino
2021-12-20 15:46:15 +00:00
parent ab96a726d6
commit 548992ab5c

View File

@@ -5,8 +5,6 @@
#include "xua_hid_report.h" #include "xua_hid_report.h"
#define USB_HID_REPORT_ID_CONSUMER ( 0x02 )
#if 0 #if 0
/* Existing static report descriptor kept for reference */ /* Existing static report descriptor kept for reference */
unsigned char hidReportDescriptor[] = unsigned char hidReportDescriptor[] =
@@ -79,7 +77,7 @@ static const USB_HID_Short_Item_t hidUsageConsumerControl = {
static const USB_HID_Report_Element_t hidReportPageConsumer = { static const USB_HID_Report_Element_t hidReportPageConsumer = {
.item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_GLOBAL, HID_REPORT_ITEM_TAG_USAGE_PAGE), .item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_GLOBAL, HID_REPORT_ITEM_TAG_USAGE_PAGE),
.item.data = { USB_HID_USAGE_PAGE_ID_CONSUMER, 0x00 }, .item.data = { USB_HID_USAGE_PAGE_ID_CONSUMER, 0x00 },
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_CONSUMER, 1, 0, 0 ) }; .location = HID_REPORT_SET_LOC( 0, 1, 0, 0 ) };
/* /*
* Define configurable items in the HID Report descriptor. * Define configurable items in the HID Report descriptor.
@@ -87,32 +85,32 @@ static const USB_HID_Report_Element_t hidReportPageConsumer = {
static USB_HID_Report_Element_t hidUsageByte0Bit5 = { static USB_HID_Report_Element_t hidUsageByte0Bit5 = {
.item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE), .item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE),
.item.data = { 0xE2, 0x00 }, .item.data = { 0xE2, 0x00 },
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_CONSUMER, 0, 0, 5 ) .location = HID_REPORT_SET_LOC( 0, 0, 0, 5 )
}; // Mute }; // Mute
static USB_HID_Report_Element_t hidUsageByte0Bit4 = { static USB_HID_Report_Element_t hidUsageByte0Bit4 = {
.item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE), .item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE),
.item.data = { 0xEA, 0x00 }, .item.data = { 0xEA, 0x00 },
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_CONSUMER, 0, 0, 4 ) .location = HID_REPORT_SET_LOC( 0, 0, 0, 4 )
}; // Vol- }; // Vol-
static USB_HID_Report_Element_t hidUsageByte0Bit3 = { static USB_HID_Report_Element_t hidUsageByte0Bit3 = {
.item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE), .item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE),
.item.data = { 0xE9, 0x00 }, .item.data = { 0xE9, 0x00 },
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_CONSUMER, 0, 0, 3 ) .location = HID_REPORT_SET_LOC( 0, 0, 0, 3 )
}; // Vol+ }; // Vol+
static USB_HID_Report_Element_t hidUsageByte0Bit2 = { static USB_HID_Report_Element_t hidUsageByte0Bit2 = {
.item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE), .item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE),
.item.data = { 0xB6, 0x00 }, .item.data = { 0xB6, 0x00 },
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_CONSUMER, 0, 0, 2 ) .location = HID_REPORT_SET_LOC( 0, 0, 0, 2 )
}; // Scan Prev }; // Scan Prev
static USB_HID_Report_Element_t hidUsageByte0Bit1 = { static USB_HID_Report_Element_t hidUsageByte0Bit1 = {
.item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE), .item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE),
.item.data = { 0xB5, 0x00 }, .item.data = { 0xB5, 0x00 },
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_CONSUMER, 0, 0, 1 ) .location = HID_REPORT_SET_LOC( 0, 0, 0, 1 )
}; // Scan Next }; // Scan Next
static USB_HID_Report_Element_t hidUsageByte0Bit0 = { static USB_HID_Report_Element_t hidUsageByte0Bit0 = {
.item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE), .item.header = HID_REPORT_SET_HEADER(1, HID_REPORT_ITEM_TYPE_LOCAL, HID_REPORT_ITEM_TAG_USAGE),
.item.data = { 0xB0, 0x00 }, .item.data = { 0xB0, 0x00 },
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_CONSUMER, 0, 0, 0 ) .location = HID_REPORT_SET_LOC( 0, 0, 0, 0 )
}; // Play }; // Play
/* /*