forked from Lotlab/nrf52-keyboard
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathusb_descriptor.h
500 lines (448 loc) · 23.9 KB
/
usb_descriptor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
/*
Copyright (C) 2018,2019 Jim Jiang <[email protected]>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#pragma once
#include <stdint.h>
#include "config.h"
#define USB_VID VENDOR_ID // Vendor ID (VID)
#define USB_PID PRODUCT_ID // Product ID (PID)
#define VER_FW_H ((DEVICE_VER & 0xFF00) >> 8) // Device release number, in binary-coded decimal
#define VER_FW_L (DEVICE_VER & 0xFF) // Device release number, in binary-coded decimal
#define EP0_PACKET_SIZE 0x08
#define NKRO_REPORT_KEYS (NKRO_EPSIZE - 1)
#define MAX_PACKET_SIZE 64
enum StringDescriptor {
STRING_DESCRIPTOR_LANG,
STRING_DESCRIPTOR_MANUFACTURER,
STRING_DESCRIPTOR_DEVICE,
STRING_DESCRIPTOR_SERIAL,
STRING_DESCRIPTOR_INTERFACE_0,
STRING_DESCRIPTOR_INTERFACE_1,
STRING_DESCRIPTOR_INTERFACE_2,
STRING_DESCRIPTOR_INTERFACE_3,
STRING_DESCRIPTOR_INTERFACE_END,
};
uint8_t const DeviceDescriptor[] = {
sizeof(DeviceDescriptor), // Length of this descriptor
0x01, // Type code of this descriptor
0x10, 0x01, // Release of USB spec
0x00, // Device's base class code
0x00, // Device's sub class code
0x00, // Device's protocol type code
EP0_PACKET_SIZE, // End point 0's packet size
USB_VID&0xFF, USB_VID>>8, // Vendor ID for device
USB_PID&0xFF, USB_PID>>8, // Product ID for device
VER_FW_L, VER_FW_H, // Revision level of device
STRING_DESCRIPTOR_MANUFACTURER, // Index of manufacturer name string desc
STRING_DESCRIPTOR_DEVICE, // Index of product name string desc
STRING_DESCRIPTOR_SERIAL, // Index of serial number string desc
1 // Number of configurations supported
};
#define DESCRIPTOR_TOTAL_LENGTH sizeof(ConfigDescriptor)
#ifdef ONBOARD_CMSIS_DAP
#define USB_NUM_INTERFACES 0x04
#else
#define USB_NUM_INTERFACES 0x03
#endif
#define USB_SUPPORT_REM_WAKE 0x00 // 0x20 support, 0x00 not support
#define USB_SUPPORT_SELF_POWERED 0x80 // not self-powered
#define USB_MAX_POWER 0xfa // 500 mA
#define report_desc_size_HID0 sizeof(report_desc_HID0)
#define report_desc_size_HID1 sizeof(report_desc_HID1)
#define report_desc_size_HID2 sizeof(report_desc_HID2)
#define report_desc_size_HID3 sizeof(report_desc_HID3)
#define HID0_REPORT_INTERFACE 0 // Report interface number of HID0
#define HID0_OUTEP_ADDR 0x01 // Output Endpoint number of HID0
#define HID0_INEP_ADDR 0x81 // Input Endpoint number of HID0
#define HID1_REPORT_INTERFACE 1 // Report interface number of HID1
#define HID1_OUTEP_ADDR 0x02 // Output Endpoint number of HID1
#define HID1_INEP_ADDR 0x82 // Input Endpoint number of HID1
#define HID2_REPORT_INTERFACE 2 // Report interface number of HID2
#define HID2_OUTEP_ADDR 0x03 // Output Endpoint number of HID2
#define HID2_INEP_ADDR 0x83 // Input Endpoint number of HID2
#define HID3_REPORT_INTERFACE 3 // Report interface number of HID3
#define HID3_OUTEP_ADDR 0x04 // Output Endpoint number of HID3
#define HID3_INEP_ADDR 0x84 // Input Endpoint number of HID3
/*-----------------------------------------------------------------------------+
| Configuration Descriptor |
|-----------------------------------------------------------------------------*/
uint8_t const ConfigDescriptor []=
{
/* Generic part */
// CONFIGURATION DESCRIPTOR (9 bytes)
0x09, // bLength
0x02, // bDescriptorType
DESCRIPTOR_TOTAL_LENGTH, 0x00, // wTotalLength
USB_NUM_INTERFACES, // bNumInterfaces
0x01, // bConfigurationvalue
0x00, // iConfiguration Description offset
USB_SUPPORT_SELF_POWERED | USB_SUPPORT_REM_WAKE, // bmAttributes, bus power, remote wakeup
USB_MAX_POWER, // Max. Power Consumption
/******************************************************* start of HID*************************************/
/*start HID[0] Here */
//-------- Descriptor for HID class device -------------------------------------
// INTERFACE DESCRIPTOR (9 bytes)
0x09, // bLength
0x04, // bDescriptorType: 4
0x00, // bInterfaceNumber: 0
0x00, // bAlternateSetting
2, // bNumEndpoints
0x03, // bInterfaceClass: 3 = HID Device
1, // bInterfaceSubClass:
1, // bInterfaceProtocol:
STRING_DESCRIPTOR_INTERFACE_0, // iInterface:
// HID DESCRIPTOR (9 bytes)
0x09, // bLength of HID descriptor
0x21, // HID Descriptor Type: 0x21
0x01,0x01, // HID Revision number 1.01
0x00, // Target country, nothing specified (00h)
0x01, // Number of HID classes to follow
0x22, // Report descriptor type
(report_desc_size_HID0 & 0x0ff), // Total length of report descriptor
(report_desc_size_HID0 > 0xff ? report_desc_size_HID0 >> 8 : 0x00),
0x07, // bLength of EndPoint Descriptor
0x05, // bDescriptorType of ENDPOINT
HID0_INEP_ADDR, // bEndpointAddress; bit7=1 for IN, bits 3-0=1 for ep1
0x03, // bmAttributes, interrupt transfers
0x40, 0x00, // wMaxPacketSize, 64 bytes
1, // bInterval, ms
0x07, // bLength
0x05, // bDescriptorType
HID0_OUTEP_ADDR, // bEndpointAddress; bit7=1 for IN, bits 3-0=1 for ep1
0x03, // bmAttributes, interrupt transfers
0x40, 0x00, // wMaxPacketSize, 64 bytes
1, // bInterval, ms
/* end of HID[0]*/
//-------- Descriptor for HID class device -------------------------------------
// INTERFACE DESCRIPTOR (9 bytes)
0x09, // bLength
0x04, // bDescriptorType: 4
0x01, // bInterfaceNumber
0x00, // bAlternateSetting
1, // bNumEndpoints
0x03, // bInterfaceClass: 3 = HID Device
0, // bInterfaceSubClass:
0, // bInterfaceProtocol:
STRING_DESCRIPTOR_INTERFACE_1, // iInterface:
// HID DESCRIPTOR (9 bytes)
0x09, // bLength of HID descriptor
0x21, // HID Descriptor Type: 0x21
0x01,0x01, // HID Revision number 1.01
0x00, // Target country, nothing specified (00h)
0x01, // Number of HID classes to follow
0x22, // Report descriptor type
(report_desc_size_HID1 & 0x0ff), // Total length of report descriptor
(report_desc_size_HID1 > 0xFF ? report_desc_size_HID1 >> 8 : 0x00),
0x07, // bLength
0x05, // bDescriptorType
HID1_INEP_ADDR, // bEndpointAddress; bit7=1 for IN, bits 3-0=1 for ep1
0x03, // bmAttributes, interrupt transfers
0x40, 0x00, // wMaxPacketSize, 64 bytes
1, // bInterval, ms
//-------- Descriptor for HID class device -------------------------------------
// INTERFACE DESCRIPTOR (9 bytes)
0x09, // bLength
0x04, // bDescriptorType: 4
0x02, // bInterfaceNumber
0x00, // bAlternateSetting
2, // bNumEndpoints
0x03, // bInterfaceClass: 3 = HID Device
0, // bInterfaceSubClass:
0, // bInterfaceProtocol:
STRING_DESCRIPTOR_INTERFACE_2, // iInterface:
// HID DESCRIPTOR (9 bytes)
0x09, // bLength of HID descriptor
0x21, // HID Descriptor Type: 0x21
0x01,0x01, // HID Revision number 1.01
0x00, // Target country, nothing specified (00h)
0x01, // Number of HID classes to follow
0x22, // Report descriptor type
(report_desc_size_HID2 & 0x0ff), // Total length of report descriptor
(report_desc_size_HID2 > 0xFF ? report_desc_size_HID2 >> 8 : 0x00),
0x07, // bLength
0x05, // bDescriptorType
HID2_INEP_ADDR, // bEndpointAddress; bit7=1 for IN, bits 3-0=1 for ep1
0x03, // bmAttributes, interrupt transfers
0x40, 0x00, // wMaxPacketSize, 64 bytes
1, // bInterval, ms
0x07, // bLength
0x05, // bDescriptorType
HID2_OUTEP_ADDR, // bEndpointAddress; bit7=1 for IN, bits 3-0=1 for ep1
0x03, // bmAttributes, interrupt transfers
0x40, 0x00, // wMaxPacketSize, 64 bytes
1, // bInterval, ms
#ifdef ONBOARD_CMSIS_DAP
//-------- Descriptor for HID class device -------------------------------------
// INTERFACE DESCRIPTOR (9 bytes)
0x09, // bLength
0x04, // bDescriptorType: 4
0x03, // bInterfaceNumber
0x00, // bAlternateSetting
2, // bNumEndpoints
0x03, // bInterfaceClass: 3 = HID Device
0, // bInterfaceSubClass:
0, // bInterfaceProtocol:
STRING_DESCRIPTOR_INTERFACE_3, // iInterface:1
// HID DESCRIPTOR (9 bytes)
0x09, // bLength of HID descriptor
0x21, // HID Descriptor Type: 0x21
0x01,0x01, // HID Revision number 1.01
0x00, // Target country, nothing specified (00h)
0x01, // Number of HID classes to follow
0x22, // Report descriptor type
(report_desc_size_HID3 & 0x0ff), // Total length of report descriptor
(report_desc_size_HID3 > 0xFF ? report_desc_size_HID3 >> 8 : 0x00),
0x07, // bLength
0x05, // bDescriptorType
HID3_INEP_ADDR, // bEndpointAddress; bit7=1 for IN, bits 3-0=1 for ep1
0x03, // bmAttributes, interrupt transfers
0x40, 0x00, // wMaxPacketSize, 64 bytes
1, // bInterval, ms
0x07, // bLength
0x05, // bDescriptorType
HID3_OUTEP_ADDR, // bEndpointAddress; bit7=1 for IN, bits 3-0=1 for ep1
0x03, // bmAttributes, interrupt transfers
0x40, 0x00, // wMaxPacketSize, 64 bytes
1, // bInterval, ms
/******************************************************* end of HID**************************************/
#endif
};
/*-----------------------------------------------------------------------------+
| String Descriptor |
|-----------------------------------------------------------------------------*/
const uint8_t LangStringDesc[] = {
// String index0, language support
4, // Length of language descriptor ID
3, // LANGID tag
0x09, 0x04, // 0x0409 for English
};
const uint8_t InterfaceStringDesc[] = {
// String index5, Interface String
26, // Length of this string descriptor
3, // bDescriptorType
'H',0x00,'I',0x00,'D',0x00,' ',0x00,'K',0x00,'e',0x00,
'y',0x00,'b',0x00,'o',0x00,'a',0x00,'r',0x00,'d',0x00,
// String index6, Interface String
36, // Length of this string descriptor
3, // bDescriptorType
'E',0x00,'x',0x00,'t',0x00,'r',0x00,'a',0x00,' ',0x00,
'K',0x00,'e',0x00,'y',0x00,' ',0x00,'S',0x00,'u',0x00,
'p',0x00,'p',0x00,'o',0x00,'r',0x00,'t',0x00,
// String index7, Interface String
40, // Length of this string descriptor
3, // bDescriptorType
'L',0x00,'o',0x00,'t',0x00,'l',0x00,'a',0x00,'b',0x00,
' ',0x00,'C',0x00,'o',0x00,'n',0x00,'f',0x00,'i',0x00,
'g',0x00,'u',0x00,'r',0x00,'a',0x00,'t',0x00,'o',0x00,
'r',0x00,
#ifdef ONBOARD_CMSIS_DAP
// String index 7, Interface String
20, // Length of this string descriptor
3, // bDescriptorType
'C',0x00,'M',0x00,'S',0x00,'I',0x00,'S',0x00,'-',0x00,
'D',0x00,'A',0x00,'P',0x00,
#endif
};
typedef struct StringPointerAndLength {
uint8_t * pointer;
uint8_t length;
} StrPtrL;
#define STRPTRL(a) {(uint8_t *)&a[0], sizeof(a)}
StrPtrL const ReportDescriptor[] = {
STRPTRL(report_desc_HID0),
STRPTRL(report_desc_HID1),
STRPTRL(report_desc_HID2),
#ifdef ONBOARD_CMSIS_DAP
STRPTRL(report_desc_HID3),
#endif
};
uint8_t const report_desc_HID0[]=
{
0x05, 0x01, // Usage Page (Generic Desktop)
0x09, 0x06, // Usage (Keyboard)
0xA1, 0x01, // Collection (Application)
0x05, 0x07, // Usage Page (Key Codes)
0x19, 0xE0, // Usage Minimum (224)
0x29, 0xE7, // Usage Maximum (231)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x01, // Logical Maximum (1)
0x75, 0x01, // Report Size (1)
0x95, 0x08, // Report Count (8)
0x81, 0x02, // Input (Data, Variable, Absolute) -- Modifier byte
0x95, 0x01, // Report Count (1)
0x75, 0x08, // Report Size (8)
0x81, 0x03, // (81 01) Input (Constant) -- Reserved byte
0x95, 0x05, // Report Count (5)
0x75, 0x01, // Report Size (1)
0x05, 0x08, // Usage Page (Page# for LEDs)
0x19, 0x01, // Usage Minimum (1)
0x29, 0x05, // Usage Maximum (5)
0x91, 0x02, // Output (Data, Variable, Absolute) -- LED report
0x95, 0x01, // Report Count (1)
0x75, 0x03, // Report Size (3)
0x91, 0x03, // (91 03) Output (Constant) -- LED report padding
0x95, 0x06, // Report Count (6)
0x75, 0x08, // Report Size (8)
0x15, 0x00, // Logical Minimum (0)
0x25, 0x66, // Logical Maximum(102) // was 0x65
0x05, 0x07, // Usage Page (Key Codes)
0x19, 0x00, // Usage Minimum (0)
0x29, 0x66, // Usage Maximum (102) // was 0x65
0x81, 0x00, // Input (Data, Array) -- Key arrays (6 bytes)
0xC0 // End Collection
};
uint8_t const report_desc_HID1[]=
{
/* system control */
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x80, // USAGE (System Control)
0xa1, 0x01, // COLLECTION (Application)
0x85, 2, // REPORT_ID (2)
0x15, 0x01, // LOGICAL_MINIMUM (0x1)
0x26, 0xb7, 0x00, // LOGICAL_MAXIMUM (0xb7)
0x19, 0x01, // USAGE_MINIMUM (0x1)
0x29, 0xb7, // USAGE_MAXIMUM (0xb7)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x00, // INPUT (Data,Array,Abs)
0xc0, // END_COLLECTION
/* consumer */
0x05, 0x0c, // USAGE_PAGE (Consumer Devices)
0x09, 0x01, // USAGE (Consumer Control)
0xa1, 0x01, // COLLECTION (Application)
0x85, 3, // REPORT_ID (3)
0x15, 0x01, // LOGICAL_MINIMUM (0x1)
0x26, 0x9c, 0x02, // LOGICAL_MAXIMUM (0x29c)
0x19, 0x01, // USAGE_MINIMUM (0x1)
0x2a, 0x9c, 0x02, // USAGE_MAXIMUM (0x29c)
0x75, 0x10, // REPORT_SIZE (16)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x00, // INPUT (Data,Array,Abs)
0xc0, // END_COLLECTION
#ifdef NKRO_ENABLE
/* nkro */
0x05, 0x01, // Usage Page (Generic Desktop),
0x09, 0x06, // Usage (Keyboard),
0xA1, 0x01, // Collection (Application),
0x85, 0x80, // REPORT_ID (128)
// bitmap of modifiers
0x75, 0x01, // Report Size (1),
0x95, 0x08, // Report Count (8),
0x05, 0x07, // Usage Page (Key Codes),
0x19, 0xE0, // Usage Minimum (224),
0x29, 0xE7, // Usage Maximum (231),
0x15, 0x00, // Logical Minimum (0),
0x25, 0x01, // Logical Maximum (1),
0x81, 0x02, // Input (Data, Variable, Absolute), ;Modifier byte
// bitmap of keys
0x95, NKRO_REPORT_KEYS * 8, // Report Count (),
0x75, 0x01, // Report Size (1),
0x15, 0x00, // Logical Minimum (0),
0x25, 0x01, // Logical Maximum(1),
0x05, 0x07, // Usage Page (Key Codes),
0x19, 0x00, // Usage Minimum (0),
0x29, (NKRO_REPORT_KEYS * 8 - 1) & 0xFF, // Usage Maximum (),
0x81, 0x02, // Input (Data, Variable, Absolute),
0xc0, // End Collection
#endif
#ifdef MOUSE_ENABLE
/* mouse */
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x02, // USAGE (Mouse)
0xa1, 0x01, // COLLECTION (Application)
0x85, 0x01, // REPORT_ID (1)
0x09, 0x01, // USAGE (Pointer)
0xa1, 0x00, // COLLECTION (Physical)
// ---------------------------- Buttons
0x05, 0x09, // USAGE_PAGE (Button)
0x19, 0x01, // USAGE_MINIMUM (Button 1)
0x29, 0x05, // USAGE_MAXIMUM (Button 5)
0x15, 0x00, // LOGICAL_MINIMUM (0)
0x25, 0x01, // LOGICAL_MAXIMUM (1)
0x75, 0x01, // REPORT_SIZE (1)
0x95, 0x05, // REPORT_COUNT (5)
0x81, 0x02, // INPUT (Data,Var,Abs)
0x75, 0x03, // REPORT_SIZE (3)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x03, // INPUT (Cnst,Var,Abs)
// ---------------------------- X,Y position
0x05, 0x01, // USAGE_PAGE (Generic Desktop)
0x09, 0x30, // USAGE (X)
0x09, 0x31, // USAGE (Y)
0x15, 0x81, // LOGICAL_MINIMUM (-127)
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x02, // REPORT_COUNT (2)
0x81, 0x06, // INPUT (Data,Var,Rel)
// ---------------------------- Vertical wheel
0x09, 0x38, // USAGE (Wheel)
0x15, 0x81, // LOGICAL_MINIMUM (-127)
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
0x35, 0x00, // PHYSICAL_MINIMUM (0) - reset physical
0x45, 0x00, // PHYSICAL_MAXIMUM (0)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x06, // INPUT (Data,Var,Rel)
// ---------------------------- Horizontal wheel
0x05, 0x0c, // USAGE_PAGE (Consumer Devices)
0x0a, 0x38, 0x02, // USAGE (AC Pan)
0x15, 0x81, // LOGICAL_MINIMUM (-127)
0x25, 0x7f, // LOGICAL_MAXIMUM (127)
0x75, 0x08, // REPORT_SIZE (8)
0x95, 0x01, // REPORT_COUNT (1)
0x81, 0x06, // INPUT (Data,Var,Rel)
0xc0, // END_COLLECTION
0xc0, // END_COLLECTION
#endif
};
uint8_t const report_desc_HID2[]=
{
0x06, 0xea, 0xff, // Usage Page (Vendor Defined)
0x09, 0x72, // Usage Page (Vendor Defined)
0xa1, 0x01, // COLLECTION (Application)
0x85, 0x3f, // Report ID (Vendor Defined)
0x95, MAX_PACKET_SIZE-1, // Report Count
0x75, 0x08, // Report Size
0x25, 0x01, // Usage Maximum
0x15, 0x01, // Usage Minimum
0x09, 0x01, // Vendor Usage
0x81, 0x02, // Input (Data,Var,Abs)
0x85, 0x3f, // Report ID (Vendor Defined)
0x95, MAX_PACKET_SIZE-1, //Report Count
0x75, 0x08, // Report Size
0x25, 0x01, // Usage Maximum
0x15, 0x01, // Usage Minimum
0x09, 0x01, // Vendor Usage
0x91, 0x02, // Ouput (Data,Var,Abs)
0xc0 // end Application Collection
};
#ifdef ONBOARD_CMSIS_DAP
uint8_t const report_desc_HID3[] = {
0x06, 0x00, 0xff, // Usage Page (Vendor Defined)
0x09, 0x01, // Usage (0x01)
0xa1, 0x01, // COLLECTION (Application)
0x15, 0x00, // Logical Minimum (0)
0x26, 0xFF, 0x00, // LOGICAL_MAXIMUM(0xff)
0x75, 0x08, // Report Size
0x95, MAX_PACKET_SIZE, // Report Count
0x09, 0x01, // Usage (0x01)
0x81, 0x02, // Input (Data,Var,Abs)
0x95, MAX_PACKET_SIZE, // Report Count
0x09, 0x01, // Usage (0x01)
0x91, 0x02, // Ouput (Data,Var,Abs)
0x95, MAX_PACKET_SIZE, // Report Count
0x09, 0x01, // Usage (0x01)
0xB1, 0x02, // Feature (Data,Var,Abs)
0xc0 // End Application Collection
};
#endif