From 97e6ae42690574e81b469962a3e7286983e1b201 Mon Sep 17 00:00:00 2001 From: mbanth Date: Fri, 17 Jan 2020 11:55:19 +0000 Subject: [PATCH 1/3] Shift bit flags to reflect the change to generic HID events. Use AC Search to report Wake-phrase detection and AC Stop to report End Call detection. --- .../src/core/endpoint0/xua_ep0_descriptors.h | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h index 74319030..566bc436 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h +++ b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h @@ -569,13 +569,21 @@ unsigned char hidReportDescriptor[] = /* Voice Command usage as per request #HUT 0xa1, 0x01, /* Collection (Application) */ 0x75, 0x01, /* Report Size (1) */ 0x95, 0x04, /* Report Count (4) */ - 0x05, 0x07, /* Usage Page (Key Codes) */ - 0x19, 0x70, /* Usage Minimum (Keyboard F21) */ - 0x29, 0x73, /* Usage Maximum (Keyboard F24) */ 0x15, 0x00, /* Logical Minimum (0) */ - 0x25, 0x01, /* Logical Maximum (1) */ - 0x81, 0x02, /* Input (Data, Var, Abs, No Wrap, Lin, Pref, No Nul) */ + 0x25, 0x00, /* Logical Maximum (0) */ 0x81, 0x01, /* Input (Cnst, Ary, Abs, No Wrap, Lin, Pref, No Nul) */ + 0x95, 0x01, /* Report Count (1) */ + 0x25, 0x01, /* Logical Maximum (1) */ + 0x05, 0x0C, /* Usage Page (Consumer) */ + 0x0a, 0x21, 0x02, /* Usage (AC Search) */ + 0x81, 0x02, /* Input (Data, Var, Abs, No Wrap, Lin, Pref, No Nul) */ + 0x0a, 0x26, 0x02, /* Usage (AC Stop) */ + 0x81, 0x02, /* Input (Data, Var, Abs, No Wrap, Lin, Pref, No Nul) */ + 0x95, 0x02, /* Report Count (2) */ + 0x05, 0x07, /* Usage Page (Key Codes) */ + 0x19, 0x72, /* Usage Minimum (Keyboard F23) */ + 0x29, 0x73, /* Usage Maximum (Keyboard F24) */ + 0x81, 0x02, /* Input (Data, Var, Abs, No Wrap, Lin, Pref, No Nul) */ 0xc0 /* End collection (Application) */ }; #endif @@ -2882,7 +2890,7 @@ unsigned char cfgDesc_Audio1[] = 0x00, /* 4 bCountryCode */ 0x01, /* 5 bNumDescriptors */ 0x22, /* 6 bDescriptorType[0] (Report) */ - 0x19, /* 7 wDescriptorLength[0] */ + 0x2B, /* 7 wDescriptorLength[0] */ 0x00, /* 8 wDescriptorLength[0] */ /* HID Endpoint descriptor (IN) */ From 90edaebc6e4ba9f458db0abf86758906188dc442 Mon Sep 17 00:00:00 2001 From: mbanth Date: Fri, 17 Jan 2020 13:13:28 +0000 Subject: [PATCH 2/3] Add comment to change log --- CHANGELOG.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 2bc5f24b..f2aa6a1e 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -17,6 +17,9 @@ lib_xua Change Log customer * CHANGE: HID interface for user to set and clear events from global variable to function + * CHANGE HID report descriptor to use generic events instead of GPI + events, to report Key-phrase detection as AC Search, and to report end-call + detection as AC Stop 0.2.1 ----- From dac71e8b38eff92525fd740f9e0538630daec0b3 Mon Sep 17 00:00:00 2001 From: mbanth Date: Fri, 17 Jan 2020 13:16:26 +0000 Subject: [PATCH 3/3] Update copyright date range --- lib_xua/src/core/endpoint0/xua_ep0_descriptors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h index 566bc436..d91dbe7a 100644 --- a/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h +++ b/lib_xua/src/core/endpoint0/xua_ep0_descriptors.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011-2019, XMOS Ltd, All rights reserved +// Copyright (c) 2011-2020, XMOS Ltd, All rights reserved /** * @file xua_ep0_descriptors.h * @brief Device Descriptors