USBLibAPIGuide  1.00.00.01
usbhid.h
Go to the documentation of this file.
1 //*****************************************************************************
2 //
3 // usbhid.h - Definitions used by HID class devices and hosts.
4 //
5 // Copyright (c) 2008-2017 Texas Instruments Incorporated. All rights reserved.
6 // Software License Agreement
7 //
8 // Texas Instruments (TI) is supplying this software for use solely and
9 // exclusively on TI's microcontroller products. The software is owned by
10 // TI and/or its suppliers, and is protected under applicable copyright
11 // laws. You may not combine this software with "viral" open-source
12 // software in order to form a larger program.
13 //
14 // THIS SOFTWARE IS PROVIDED "AS IS" AND WITH ALL FAULTS.
15 // NO WARRANTIES, WHETHER EXPRESS, IMPLIED OR STATUTORY, INCLUDING, BUT
16 // NOT LIMITED TO, IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17 // A PARTICULAR PURPOSE APPLY TO THIS SOFTWARE. TI SHALL NOT, UNDER ANY
18 // CIRCUMSTANCES, BE LIABLE FOR SPECIAL, INCIDENTAL, OR CONSEQUENTIAL
19 // DAMAGES, FOR ANY REASON WHATSOEVER.
20 //
21 //*****************************************************************************
22 
23 #ifndef __USBHID_H__
24 #define __USBHID_H__
25 
26 //*****************************************************************************
27 //
28 // If building with a C++ compiler, make all of the definitions in this header
29 // have a C binding.
30 //
31 //*****************************************************************************
32 #ifdef __cplusplus
33 extern "C"
34 {
35 #endif
36 
37 //*****************************************************************************
38 //
41 //
42 //*****************************************************************************
43 
44 //*****************************************************************************
45 //
46 // HID Interface descriptor Subclasses.
47 //
48 //*****************************************************************************
49 #define USB_HID_SCLASS_NONE 0x00
50 #define USB_HID_SCLASS_BOOT 0x01
51 
52 //*****************************************************************************
53 //
54 // USB Interface descriptor HID protocols.
55 //
56 //*****************************************************************************
57 #define USB_HID_PROTOCOL_NONE 0
58 #define USB_HID_PROTOCOL_KEYB 1
59 #define USB_HID_PROTOCOL_MOUSE 2
60 
61 //*****************************************************************************
62 //
63 // HID Class descriptor types.
64 //
65 //*****************************************************************************
66 #define USB_HID_DTYPE_HID 0x21
67 #define USB_HID_DTYPE_REPORT 0x22
68 #define USB_HID_DTYPE_PHYSICAL 0x23
69 
70 //*****************************************************************************
71 //
72 // HID USB requests.
73 //
74 //*****************************************************************************
75 #define USBREQ_GET_REPORT 0x01
76 #define USBREQ_GET_IDLE 0x02
77 #define USBREQ_GET_PROTOCOL 0x03
78 #define USBREQ_SET_REPORT 0x09
79 #define USBREQ_SET_IDLE 0x0a
80 #define USBREQ_SET_PROTOCOL 0x0b
81 
82 //*****************************************************************************
83 //
84 // GET_REPORT or SET_REPORT Definitions.
85 //
86 //*****************************************************************************
87 #define USB_HID_REPORT_IN 0x01
88 #define USB_HID_REPORT_OUTPUT 0x02
89 #define USB_HID_REPORT_FEATURE 0x03
90 
91 //*****************************************************************************
92 //
93 // GET_PROTOCOL or SET_PROTOCOL Definitions.
94 //
95 //*****************************************************************************
96 #define USB_HID_PROTOCOL_BOOT 0
97 #define USB_HID_PROTOCOL_REPORT 1
98 
99 //*****************************************************************************
100 //
101 // Report Values used with the Report macros.
102 //
103 //*****************************************************************************
104 #define USB_HID_GENERIC_DESKTOP 0x01
105 #define USB_HID_BUTTONS 0x09
106 #define USB_HID_SENSOR 0x20
107 #define USB_HID_X 0x30
108 #define USB_HID_Y 0x31
109 #define USB_HID_Z 0x32
110 #define USB_HID_RX 0x33
111 #define USB_HID_RY 0x34
112 #define USB_HID_RZ 0x35
113 
114 #define USB_HID_POINTER 0x01
115 #define USB_HID_MOUSE 0x02
116 #define USB_HID_JOYSTICK 0x04
117 #define USB_HID_GAME_PAD 0x05
118 #define USB_HID_KEYBOARD 0x06
119 #define USB_HID_SENSOR_TYPE_COLLECTION 0X01
120 #define USB_HID_ENVIRONMENTAL_TEMPERATURE 0x33
121 
122 #define USB_HID_PHYSICAL 0x00
123 #define USB_HID_APPLICATION 0x01
124 #define USB_HID_LOGICAL 0x02
125 
126 #define USB_HID_USAGE_POINTER 0x0109
127 #define USB_HID_USAGE_BUTTONS 0x0509
128 #define USB_HID_USAGE_LEDS 0x0508
129 #define USB_HID_USAGE_KEYCODES 0x0507
130 
131 //*****************************************************************************
132 //
133 // HID mouse button definitions as used in the first byte of the output report
134 // used in the BIOS mouse protocol.
135 //
136 //*****************************************************************************
137 #define HID_MOUSE_BUTTON_1 0x01
138 #define HID_MOUSE_BUTTON_2 0x02
139 #define HID_MOUSE_BUTTON_3 0x04
140 
141 //*****************************************************************************
142 //
143 // HID Keyboard LED definitions as used in the first byte of the output report
144 // used in the BIOS keyboard protocol.
145 //
146 //*****************************************************************************
147 #define HID_KEYB_NUM_LOCK 0x01
148 #define HID_KEYB_CAPS_LOCK 0x02
149 #define HID_KEYB_SCROLL_LOCK 0x04
150 #define HID_KEYB_COMPOSE 0x08
151 #define HID_KEYB_KANA 0x10
152 
153 //*****************************************************************************
154 //
155 // HID Keyboard key modifiers as provided in the first byte of the input report
156 // used in the BIOS keyboard protocol.
157 //
158 //*****************************************************************************
159 #define HID_KEYB_LEFT_CTRL 0x01
160 #define HID_KEYB_LEFT_SHIFT 0x02
161 #define HID_KEYB_LEFT_ALT 0x04
162 #define HID_KEYB_LEFT_GUI 0x08
163 #define HID_KEYB_RIGHT_CTRL 0x10
164 #define HID_KEYB_RIGHT_SHIFT 0x20
165 #define HID_KEYB_RIGHT_ALT 0x40
166 #define HID_KEYB_RIGHT_GUI 0x80
167 
168 //*****************************************************************************
169 //
170 // A subset of the HID keyboard usage IDs.
171 //
172 //*****************************************************************************
173 #define HID_KEYB_USAGE_RESERVED 0x00
174 #define HID_KEYB_USAGE_ROLLOVER 0x01
175 #define HID_KEYB_USAGE_A 0x04
176 #define HID_KEYB_USAGE_B 0x05
177 #define HID_KEYB_USAGE_C 0x06
178 #define HID_KEYB_USAGE_D 0x07
179 #define HID_KEYB_USAGE_E 0x08
180 #define HID_KEYB_USAGE_F 0x09
181 #define HID_KEYB_USAGE_G 0x0A
182 #define HID_KEYB_USAGE_H 0x0B
183 #define HID_KEYB_USAGE_I 0x0C
184 #define HID_KEYB_USAGE_J 0x0D
185 #define HID_KEYB_USAGE_K 0x0E
186 #define HID_KEYB_USAGE_L 0x0F
187 #define HID_KEYB_USAGE_M 0x10
188 #define HID_KEYB_USAGE_N 0x11
189 #define HID_KEYB_USAGE_O 0x12
190 #define HID_KEYB_USAGE_P 0x13
191 #define HID_KEYB_USAGE_Q 0x14
192 #define HID_KEYB_USAGE_R 0x15
193 #define HID_KEYB_USAGE_S 0x16
194 #define HID_KEYB_USAGE_T 0x17
195 #define HID_KEYB_USAGE_U 0x18
196 #define HID_KEYB_USAGE_V 0x19
197 #define HID_KEYB_USAGE_W 0x1A
198 #define HID_KEYB_USAGE_X 0x1B
199 #define HID_KEYB_USAGE_Y 0x1C
200 #define HID_KEYB_USAGE_Z 0x1D
201 #define HID_KEYB_USAGE_1 0x1E
202 #define HID_KEYB_USAGE_2 0x1F
203 #define HID_KEYB_USAGE_3 0x20
204 #define HID_KEYB_USAGE_4 0x21
205 #define HID_KEYB_USAGE_5 0x22
206 #define HID_KEYB_USAGE_6 0x23
207 #define HID_KEYB_USAGE_7 0x24
208 #define HID_KEYB_USAGE_8 0x25
209 #define HID_KEYB_USAGE_9 0x26
210 #define HID_KEYB_USAGE_0 0x27
211 #define HID_KEYB_USAGE_ENTER 0x28
212 #define HID_KEYB_USAGE_ESCAPE 0x29
213 #define HID_KEYB_USAGE_BACKSPACE \
214  0x2A
215 #define HID_KEYB_USAGE_TAB 0x2B
216 #define HID_KEYB_USAGE_SPACE 0x2C
217 #define HID_KEYB_USAGE_MINUS 0x2D
218 #define HID_KEYB_USAGE_EQUAL 0x2E
219 #define HID_KEYB_USAGE_LBRACKET 0x2F
220 #define HID_KEYB_USAGE_RBRACKET 0x30
221 #define HID_KEYB_USAGE_BSLASH 0x31
222 #define HID_KEYB_USAGE_SEMICOLON \
223  0x33
224 #define HID_KEYB_USAGE_FQUOTE 0x34
225 #define HID_KEYB_USAGE_BQUOTE 0x35
226 #define HID_KEYB_USAGE_COMMA 0x36
227 #define HID_KEYB_USAGE_PERIOD 0x37
228 #define HID_KEYB_USAGE_FSLASH 0x38
229 #define HID_KEYB_USAGE_CAPSLOCK 0x39
230 #define HID_KEYB_USAGE_F1 0x3A
231 #define HID_KEYB_USAGE_F2 0x3B
232 #define HID_KEYB_USAGE_F3 0x3C
233 #define HID_KEYB_USAGE_F4 0x3D
234 #define HID_KEYB_USAGE_F5 0x3E
235 #define HID_KEYB_USAGE_F6 0x3F
236 #define HID_KEYB_USAGE_F7 0x40
237 #define HID_KEYB_USAGE_F8 0x41
238 #define HID_KEYB_USAGE_F9 0x42
239 #define HID_KEYB_USAGE_F10 0x43
240 #define HID_KEYB_USAGE_F11 0x44
241 #define HID_KEYB_USAGE_F12 0x45
242 #define HID_KEYB_USAGE_SCROLLOCK \
243  0x47
244 #define HID_KEYB_USAGE_PAGE_UP 0x4B
245 #define HID_KEYB_USAGE_PAGE_DOWN \
246  0x4E
247 #define HID_KEYB_USAGE_RIGHT_ARROW \
248  0x4F
249 #define HID_KEYB_USAGE_LEFT_ARROW \
250  0x50
251 #define HID_KEYB_USAGE_DOWN_ARROW \
252  0x51
253 #define HID_KEYB_USAGE_UP_ARROW 0x52
254 #define HID_KEYB_USAGE_NUMLOCK 0x53
255 #define HID_KEYB_USAGE_KEYPAD_SLASH \
256  0x54
257 #define HID_KEYB_USAGE_KEYPAD_STAR \
258  0x55
259 #define HID_KEYB_USAGE_KEYPAD_MINUS \
260  0x56
261 #define HID_KEYB_USAGE_KEYPAD_PLUS \
262  0x57
263 #define HID_KEYB_USAGE_KEPAD_ENTER \
264  0x58
265 #define HID_KEYB_USAGE_KEYPAD_1 0x59
266 #define HID_KEYB_USAGE_KEYPAD_2 0x5A
267 #define HID_KEYB_USAGE_KEYPAD_3 0x5B
268 #define HID_KEYB_USAGE_KEYPAD_4 0x5C
269 #define HID_KEYB_USAGE_KEYPAD_5 0x5D
270 #define HID_KEYB_USAGE_KEYPAD_6 0x5E
271 #define HID_KEYB_USAGE_KEYPAD_7 0x5F
272 #define HID_KEYB_USAGE_KEYPAD_8 0x60
273 #define HID_KEYB_USAGE_KEYPAD_9 0x61
274 #define HID_KEYB_USAGE_KEYPAD_0 0x62
275 #define HID_KEYB_USAGE_KEPAD_PERIOD \
276  0x63
277 
278 //*****************************************************************************
279 //
280 // HID descriptor country codes (most of these are described as "countries" in
281 // the HID specification even though they are really languages).
282 //
283 //*****************************************************************************
284 #define USB_HID_COUNTRY_NONE 0x00
285 #define USB_HID_COUNTRY_ARABIC 0x01
286 #define USB_HID_COUNTRY_BELGIAN 0x02
287 #define USB_HID_COUNTRY_CANADA_BI \
288  0x03
289 #define USB_HID_COUNTRY_CANADA_FR \
290  0x04
291 #define USB_HID_COUNTRY_CZECH_REPUBLIC \
292  0x05
293 #define USB_HID_COUNTRY_DANISH 0x06
294 #define USB_HID_COUNTRY_FINNISH 0x07
295 #define USB_HID_COUNTRY_FRENCH 0x08
296 #define USB_HID_COUNTRY_GERMAN 0x09
297 #define USB_HID_COUNTRY_GREEK 0x0A
298 #define USB_HID_COUNTRY_HEBREW 0x0B
299 #define USB_HID_COUNTRY_HUNGARY 0x0C
300 #define USB_HID_COUNTRY_INTERNATIONAL_ISO \
301  0x0D
302 #define USB_HID_COUNTRY_ITALIAN 0x0E
303 #define USB_HID_COUNTRY_JAPAN_KATAKANA \
304  0x0F
305 #define USB_HID_COUNTRY_KOREAN 0x10
306 #define USB_HID_COUNTRY_LATIN_AMERICAN \
307  0x11
308 #define USB_HID_COUNTRY_NETHERLANDS \
309  0x12
310 #define USB_HID_COUNTRY_NORWEGIAN \
311  0x13
312 #define USB_HID_COUNTRY_PERSIAN 0x14
313 #define USB_HID_COUNTRY_POLAND 0x15
314 #define USB_HID_COUNTRY_PORTUGUESE \
315  0x16
316 #define USB_HID_COUNTRY_RUSSIA 0x17
317 #define USB_HID_COUNTRY_SLOVAKIA \
318  0x18
319 #define USB_HID_COUNTRY_SPANISH 0x19
320 #define USB_HID_COUNTRY_SWEDISH 0x1A
321 #define USB_HID_COUNTRY_SWISS_FRENCH \
322  0x1B
323 #define USB_HID_COUNTRY_SWISS_GERMAN \
324  0x1C
325 #define USB_HID_COUNTRY_SWITZERLAND \
326  0x1D
327 #define USB_HID_COUNTRY_TAIWAN 0x1E
328 #define USB_HID_COUNTRY_TURKISH_Q \
329  0x1F
330 #define USB_HID_COUNTRY_UK 0x20
331 #define USB_HID_COUNTRY_US 0x21
332 #define USB_HID_COUNTRY_YUGOSLAVIA \
333  0x22
334 #define USB_HID_COUNTRY_TURKISH_F \
335  0x23
336 
337 //*****************************************************************************
338 //
339 // Data flags used in Input item tags within report descriptors.
340 //
341 //*****************************************************************************
342 #define USB_HID_INPUT_DATA 0x0000
343 #define USB_HID_INPUT_CONSTANT 0x0001
344 #define USB_HID_INPUT_ARRAY 0x0000
345 #define USB_HID_INPUT_VARIABLE 0x0002
346 #define USB_HID_INPUT_ABS 0x0000
347 #define USB_HID_INPUT_RELATIVE 0x0004
348 #define USB_HID_INPUT_NOWRAP 0x0000
349 #define USB_HID_INPUT_WRAP 0x0008
350 #define USB_HID_INPUT_LINEAR 0x0000
351 #define USB_HID_INPUT_NONLINEAR 0x0010
352 #define USB_HID_INPUT_PREFER 0x0000
353 #define USB_HID_INPUT_NONPREFER 0x0020
354 #define USB_HID_INPUT_NONULL 0x0000
355 #define USB_HID_INPUT_NULL 0x0040
356 #define USB_HID_INPUT_BITF 0x0100
357 #define USB_HID_INPUT_BYTES 0x0000
358 
359 //*****************************************************************************
360 //
361 // Data flags used in Feature item tags within report descriptors.
362 //
363 //*****************************************************************************
364 #define USB_HID_FEATURE_DATA 0x0000
365 #define USB_HID_FEATURE_CONSTANT \
366  0x0001
367 #define USB_HID_FEATURE_ARRAY 0x0000
368 #define USB_HID_FEATURE_VARIABLE \
369  0x0002
370 #define USB_HID_FEATURE_ABS 0x0000
371 #define USB_HID_FEATURE_RELATIVE \
372  0x0004
373 #define USB_HID_FEATURE_NOWRAP 0x0000
374 #define USB_HID_FEATURE_WRAP 0x0008
375 #define USB_HID_FEATURE_LINEAR 0x0000
376 #define USB_HID_FEATURE_NONLINEAR \
377  0x0010
378 #define USB_HID_FEATURE_PREFER 0x0000
379 #define USB_HID_FEATURE_NONPREFER \
380  0x0020
381 #define USB_HID_FEATURE_NONULL 0x0000
382 #define USB_HID_FEATURE_NULL 0x0040
383 #define USB_HID_FEATURE_BITF 0x0100
384 #define USB_HID_FEATURE_BYTES 0x0000
385 
386 //*****************************************************************************
387 //
388 // Data flags used in Output item tags within report descriptors.
389 //
390 //*****************************************************************************
391 #define USB_HID_OUTPUT_DATA 0x0000
392 #define USB_HID_OUTPUT_CONSTANT 0x0001
393 #define USB_HID_OUTPUT_ARRAY 0x0000
394 #define USB_HID_OUTPUT_VARIABLE 0x0002
395 #define USB_HID_OUTPUT_ABS 0x0000
396 #define USB_HID_OUTPUT_RELATIVE 0x0004
397 #define USB_HID_OUTPUT_NOWRAP 0x0000
398 #define USB_HID_OUTPUT_WRAP 0x0008
399 #define USB_HID_OUTPUT_LINEAR 0x0000
400 #define USB_HID_OUTPUT_NONLINEAR \
401  0x0010
402 #define USB_HID_OUTPUT_PREFER 0x0000
403 #define USB_HID_OUTPUT_NONPREFER \
404  0x0020
405 #define USB_HID_OUTPUT_NONULL 0x0000
406 #define USB_HID_OUTPUT_NULL 0x0040
407 #define USB_HID_OUTPUT_BITF 0x0100
408 #define USB_HID_OUTPUT_BYTES 0x0000
409 
410 //*****************************************************************************
411 //
412 // Physical descriptor bias values.
413 //
414 //*****************************************************************************
415 #define USB_HID_BIAS_NOT_APPLICABLE \
416  0x00
417 #define USB_HID_BIAS_RIGHT_HAND 0x01
418 #define USB_HID_BIAS_LEFT_HAND 0x02
419 #define USB_HID_BIAS_BOTH_HANDS 0x03
420 #define USB_HID_BIAS_EITHER_HAND \
421  0x04
422 
423 //*****************************************************************************
424 //
425 // Physical descriptor designator values.
426 //
427 //*****************************************************************************
428 #define USB_HID_DESIGNATOR_NONE 0x00
429 #define USB_HID_DESIGNATOR_HAND 0x01
430 #define USB_HID_DESIGNATOR_EYEBALL \
431  0x02
432 #define USB_HID_DESIGNATOR_EYEBROW \
433  0x03
434 #define USB_HID_DESIGNATOR_EYELID \
435  0x04
436 #define USB_HID_DESIGNATOR_EAR 0x05
437 #define USB_HID_DESIGNATOR_NOSE 0x06
438 #define USB_HID_DESIGNATOR_MOUTH \
439  0x07
440 #define USB_HID_DESIGNATOR_UPPER_LIP \
441  0x08
442 #define USB_HID_DESIGNATOR_LOWER_LIP \
443  0x09
444 #define USB_HID_DESIGNATOR_JAW 0x0A
445 #define USB_HID_DESIGNATOR_NECK 0x0B
446 #define USB_HID_DESIGNATOR_UPPER_ARM \
447  0x0C
448 #define USB_HID_DESIGNATOR_ELBOW \
449  0x0D
450 #define USB_HID_DESIGNATOR_FOREARM \
451  0x0E
452 #define USB_HID_DESIGNATOR_WRIST \
453  0x0F
454 #define USB_HID_DESIGNATOR_PALM 0x10
455 #define USB_HID_DESIGNATOR_THUMB \
456  0x11
457 #define USB_HID_DESIGNATOR_INDEX_FINGER \
458  0x12
459 #define USB_HID_DESIGNATOR_MIDDLE_FINGER \
460  0x13
461 #define USB_HID_DESIGNATOR_RING_FINGER \
462  0x14
463 #define USB_HID_DESIGNATOR_LITTLE_FINGER \
464  0x15
465 #define USB_HID_DESIGNATOR_HEAD 0x16
466 #define USB_HID_DESIGNATOR_SHOULDER \
467  0x17
468 #define USB_HID_DESIGNATOR_HIP 0x18
469 #define USB_HID_DESIGNATOR_WAIST \
470  0x19
471 #define USB_HID_DESIGNATOR_THIGH \
472  0x1A
473 #define USB_HID_DESIGNATOR_KNEE 0x1B
474 #define USB_HID_DESIGNATOR_CALF 0x1C
475 #define USB_HID_DESIGNATOR_ANKLE \
476  0x1D
477 #define USB_HID_DESIGNATOR_FOOT 0x1E
478 #define USB_HID_DESIGNATOR_HEEL 0x1F
479 #define USB_HID_DESIGNATOR_BALL_OF_FOOT \
480  0x20
481 #define USB_HID_DESIGNATOR_BIG_TOE \
482  0x21
483 #define USB_HID_DESIGNATOR_SECOND_TOE \
484  0x22
485 #define USB_HID_DESIGNATOR_THIRD_TOE \
486  0x23
487 #define USB_HID_DESIGNATOR_FOURTH_TOE \
488  0x24
489 #define USB_HID_DESIGNATOR_LITTLE_TOE \
490  0x25
491 #define USB_HID_DESIGNATOR_BROW 0x26
492 #define USB_HID_DESIGNATOR_CHEEK \
493  0x27
494 
495 //*****************************************************************************
496 //
497 // Physical descriptor qualifier values.
498 //
499 //*****************************************************************************
500 #define USB_HID_QUALIFIER_NOT_APPLICABLE \
501  (0x00 << 5)
502 #define USB_HID_QUALIFIER_RIGHT (0x01 << 5)
503 #define USB_HID_QUALIFIER_LEFT (0x02 << 5)
504 #define USB_HID_QUALIFIER_BOTH (0x03 << 5)
505 #define USB_HID_QUALIFIER_EITHER \
506  (0x04 << 5)
507 #define USB_HID_QUALIFIER_CENTER \
508  (0x05 << 5)
509 
510 //*****************************************************************************
511 //
512 // This is the maximum value for a usage code.
513 //
514 //*****************************************************************************
515 #define USBH_HID_MAX_USAGE 256
516 #define USBH_HID_CAPS_ARRAY_SZ (USBH_HID_MAX_USAGE/sizeof(uint32_t))
517 
518 //*****************************************************************************
519 //
520 // All structures defined in this section of the header require byte packing of
521 // fields. This is usually accomplished using the PACKED macro but, for IAR
522 // Embedded Workbench, this requires a pragma.
523 //
524 //*****************************************************************************
525 #ifdef __ICCARM__
526 #pragma pack(1)
527 #endif
528 
529 //*****************************************************************************
530 //
533 //
534 //*****************************************************************************
535 typedef struct
536 {
537  //
540  //
541  uint8_t bDescriptorType;
542 
543  //
545  //
547 }
548 PACKED tHIDClassDescriptorInfo;
549 
550 //*****************************************************************************
551 //
554 //
555 //*****************************************************************************
556 typedef struct
557 {
558  //
560  //
561  uint8_t bLength;
562 
563  //
566  //
567  uint8_t bDescriptorType;
568 
569  //
573  //
574  uint16_t bcdHID;
575 
576  //
580  uint8_t bCountryCode;
581 
582  //
587  //
589 
590  //
594  //
595  tHIDClassDescriptorInfo sClassDescriptor[1];
596 }
597 PACKED tHIDDescriptor;
598 
599 //*****************************************************************************
600 //
601 // Return to default packing when using the IAR Embedded Workbench compiler.
602 //
603 //*****************************************************************************
604 #ifdef __ICCARM__
605 #pragma pack()
606 #endif
607 
608 //*****************************************************************************
609 //
619 //
620 //*****************************************************************************
621 typedef struct
622 {
623  //
626  //
628 
629  //
633  //
634  uint32_t pui32CapsLock[USBH_HID_CAPS_ARRAY_SZ];
635 
636  //
640  //
642 }
644 
645 //*****************************************************************************
646 //
647 // The US Keyboard mapping used by USB keyboard usage ID to character mapping.
648 //
649 //*****************************************************************************
651 
652 //*****************************************************************************
653 //
654 // Close the Doxygen group.
656 //
657 //*****************************************************************************
658 
659 //*****************************************************************************
660 //
661 // Mark the end of the C bindings section for C++ compilers.
662 //
663 //*****************************************************************************
664 #ifdef __cplusplus
665 }
666 #endif
667 
668 #endif // __USBHID_H__
const tHIDKeyboardUsageTable g_sUSKeyboardMap
Definition: usbkeyboardmap.c:120
uint16_t bcdHID
Definition: usbhid.h:574
uint8_t bNumDescriptors
Definition: usbhid.h:588
uint8_t bCountryCode
Definition: usbhid.h:580
uint16_t wDescriptorLength
The total length of the HID class descriptor.
Definition: usbhid.h:546
void * pvCharMapping
Definition: usbhid.h:641
Definition: usbhid.h:621
uint8_t ui8BytesPerChar
Definition: usbhid.h:627
#define USBH_HID_CAPS_ARRAY_SZ
Definition: usbhid.h:516
USB_CDC_GET/SET_LINE_CODING request-specific data.
Definition: usbaudio.h:288
© Copyright 1995-2020, Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy policy | Terms of use | Terms of sale