Added support for AC Stop (End Call), Volume Increment and Volume

Decrement bit fields in the HID report.
This commit is contained in:
mbanth
2019-12-13 18:17:36 +00:00
parent d8f34aa64d
commit e5389e4348
3 changed files with 12 additions and 9 deletions

View File

@@ -11,6 +11,8 @@ lib_xua Change Log
microphone operation
* FIXED: Descriptors for XUA_ADAPTIVE incorrectly defined for IN endpoint
* ADDED: Guards to user_hid.h and xua_hid.h
* ADDED: UAC1 HID support for AC Stop (End Call), Volume Increment and
Volume Decrement
0.2.1
-----

View File

@@ -573,9 +573,12 @@ unsigned char hidReportDescriptor[] = /* Voice Command usage as per request #HUT
0x0a, 0x00, 0x02, /* Usage (Generic GUI Application Controls) */
0xa1, 0x02, /* Collection (Logical) */
0x0a, 0x21, 0x02, /* Usage (AC Search) */
0x95, 0x01, /* Report Count (1) */
0x0a, 0x26, 0x02, /* Usage (AC Stop) */
0x09, 0xe9, /* Usage (Volume Increment) */
0x09, 0xea, /* Usage (Volume Decrement) */
0x95, 0x04, /* Report Count (4) */
0x81, 0x40, /* Input (Data, Ary, Abs, Nul) */
0x95, 0x07, /* Report Count (7) */
0x95, 0x04, /* Report Count (4) */
0x81, 0x01, /* Input (Cnst, Ary, Abs) */
0xc0, /* End collection (Logical) */
0xc0 /* End collection (Application) */
@@ -2884,7 +2887,7 @@ unsigned char cfgDesc_Audio1[] =
0x00, /* 4 bCountryCode */
0x01, /* 5 bNumDescriptors */
0x22, /* 6 bDescriptorType[0] (Report) */
0x1E, /* 7 wDescriptorLength[0] */
0x25, /* 7 wDescriptorLength[0] */
0x00, /* 8 wDescriptorLength[0] */
/* HID Endpoint descriptor (IN) */

View File

@@ -4,12 +4,10 @@
#define __USER_HID_H__
/* These defines relate to the HID report desc - do not mod */
#define HID_CONTROL_PLAYPAUSE_SHIFT 0x00
#define HID_CONTROL_NEXT_SHIFT 0x01
#define HID_CONTROL_PREV_SHIFT 0x02
#define HID_CONTROL_VOLUP_SHIFT 0x03
#define HID_CONTROL_VOLDN_SHIFT 0x04
#define HID_CONTROL_MUTE_SHIFT 0x05
#define HID_CONTROL_KEYWORD_SHIFT 0x00
#define HID_CONTROL_ENDCALL_SHIFT 0x01
#define HID_CONTROL_VOLUP_SHIFT 0x02
#define HID_CONTROL_VOLDN_SHIFT 0x03
#define HID_DATA_SIZE 1