From 34ebbc8509a4f4ae0ef8d167bf34e3f5d0814130 Mon Sep 17 00:00:00 2001 From: Michael Banther Date: Mon, 7 Oct 2019 12:35:23 +0100 Subject: [PATCH] Change the HID Report Descriptor to use the AC Search Usage instead of Voice Command. --- .../src/core/endpoint0/xua_ep0_descriptors.h | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h index e6c56aa9..cf50c8eb 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h +++ b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h @@ -548,7 +548,8 @@ unsigned char devQualDesc_Null[] = #if( 0 < HID_CONTROLS ) -unsigned char hidReportDescriptor[] = +#if 0 +unsigned char hidReportDescriptor[] = /* Voice Command usage as per request #HUTRR45 */ { 0x05, 0x0c, /* Usage Page (Consumer Device) */ 0x09, 0x01, /* Usage (Consumer Control) */ @@ -563,6 +564,26 @@ unsigned char hidReportDescriptor[] = 0x81, 0x01, /* Input (Cnst, Ary, Abs) */ 0xc0 /* End collection */ }; +#else +unsigned char hidReportDescriptor[] = /* GUI AC Search usage */ +{ + 0x15, 0x01, /* Logical Minimum (1) */ + 0x25, 0x01, /* Logical Maximum (1) */ + 0x75, 0x01, /* Report Size (1) */ + 0x05, 0x0c, /* Usage Page (Consumer Device) */ + 0x09, 0x01, /* Usage (Consumer Control) */ + 0xa1, 0x01, /* Collection (Application) */ + 0x0a, 0x00, 0x02, /* Usage (Generic GUI Application Controls) */ + 0xa1, 0x02, /* Collection (Logical) */ + 0x0a, 0x21, 0x02, /* Usage (AC Search) */ + 0x95, 0x01, /* Report Count (1) */ + 0x81, 0x40, /* Input (Data, Ary, Abs, Nul) */ + 0x95, 0x07, /* Report Count (7) */ + 0x81, 0x01, /* Input (Cnst, Ary, Abs) */ + 0xc0, /* End collection (Logical) */ + 0xc0 /* End collection (Application) */ +}; +#endif #endif /* Max packet sizes: @@ -2850,7 +2871,7 @@ unsigned char cfgDesc_Audio1[] = 0x00, /* 4 bCountryCode */ 0x01, /* 5 bNumDescriptors */ 0x22, /* 6 bDescriptorType[0] (Report) */ - 0x17, /* 7 wDescriptorLength[0] */ + 0x1E, /* 7 wDescriptorLength[0] */ 0x00, /* 8 wDescriptorLength[0] */ /* HID Endpoint descriptor (IN) */