forked from PAWPAW-Mirror/lib_xua
Add constants header for common constants; helper macro for header
This commit is contained in:
@@ -10,10 +10,6 @@
|
||||
#define USB_HID_REPORT_ID_CONSUMER ( 0x02 )
|
||||
#define USB_HID_REPORT_ID_TELEPHONY ( 0x03 )
|
||||
|
||||
#define USB_HID_USAGE_PAGE_ID_CONSUMER ( 0x0C )
|
||||
#define USB_HID_USAGE_PAGE_ID_KEYBOARD ( 0x07 )
|
||||
#define USB_HID_USAGE_PAGE_ID_TELEPHONY ( 0x0B )
|
||||
|
||||
/*
|
||||
* Define non-configurable items in the HID Report descriptor.
|
||||
* (These are short items as the location field isn't relevant for them)
|
||||
@@ -55,7 +51,7 @@ static const USB_HID_Report_Element_t hidReportConsumer = {
|
||||
};
|
||||
|
||||
static const USB_HID_Report_Element_t hidReportTelephony = {
|
||||
.item = { .header = 0x05, .data = { USB_HID_USAGE_PAGE_ID_TELEPHONY, 0x00 }},
|
||||
.item = { .header = 0x05, .data = { USB_HID_USAGE_PAGE_ID_TELEPHONY_DEVICE, 0x00 }},
|
||||
.location = HID_REPORT_SET_LOC( USB_HID_REPORT_ID_TELEPHONY, 1, 0, 0 )
|
||||
};
|
||||
|
||||
|
||||
@@ -6,8 +6,6 @@
|
||||
|
||||
#include "xua_hid_report.h"
|
||||
|
||||
#define USB_HID_USAGE_PAGE_ID_CONSUMER ( 0x0C )
|
||||
|
||||
/*
|
||||
* Define non-configurable items in the HID Report descriptor.
|
||||
* (These are short items as the location field isn't relevant for them)
|
||||
|
||||
@@ -22,12 +22,6 @@
|
||||
#define LOUDNESS_CONTROL ( 0xE7 )
|
||||
#define AL_CONTROL_PANEL ( 0x019F )
|
||||
|
||||
// Constants from the USB Device Class Definition for HID
|
||||
#define HID_REPORT_ITEM_TYPE_MAIN ( 0x00 )
|
||||
#define HID_REPORT_ITEM_TYPE_GLOBAL ( 0x01 )
|
||||
#define HID_REPORT_ITEM_TYPE_LOCAL ( 0x02 )
|
||||
#define HID_REPORT_ITEM_TYPE_RESERVED ( 0x03 )
|
||||
|
||||
static unsigned construct_usage_header( unsigned size )
|
||||
{
|
||||
unsigned header = 0x00;
|
||||
|
||||
Reference in New Issue
Block a user