STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
usbh_hid_keybd.h
Go to the documentation of this file.
1 
28 /* Define to prevent recursive -----------------------------------------------*/
29 #ifndef __USBH_HID_KEYBD_H
30 #define __USBH_HID_KEYBD_H
31 
32 #ifdef __cplusplus
33  extern "C" {
34 #endif
35 
36 /* Includes ------------------------------------------------------------------*/
37 #include "usbh_hid.h"
38 #include "usbh_hid_keybd.h"
39 
61 #define KEY_NONE 0x00
62 #define KEY_ERRORROLLOVER 0x01
63 #define KEY_POSTFAIL 0x02
64 #define KEY_ERRORUNDEFINED 0x03
65 #define KEY_A 0x04
66 #define KEY_B 0x05
67 #define KEY_C 0x06
68 #define KEY_D 0x07
69 #define KEY_E 0x08
70 #define KEY_F 0x09
71 #define KEY_G 0x0A
72 #define KEY_H 0x0B
73 #define KEY_I 0x0C
74 #define KEY_J 0x0D
75 #define KEY_K 0x0E
76 #define KEY_L 0x0F
77 #define KEY_M 0x10
78 #define KEY_N 0x11
79 #define KEY_O 0x12
80 #define KEY_P 0x13
81 #define KEY_Q 0x14
82 #define KEY_R 0x15
83 #define KEY_S 0x16
84 #define KEY_T 0x17
85 #define KEY_U 0x18
86 #define KEY_V 0x19
87 #define KEY_W 0x1A
88 #define KEY_X 0x1B
89 #define KEY_Y 0x1C
90 #define KEY_Z 0x1D
91 #define KEY_1_EXCLAMATION_MARK 0x1E
92 #define KEY_2_AT 0x1F
93 #define KEY_3_NUMBER_SIGN 0x20
94 #define KEY_4_DOLLAR 0x21
95 #define KEY_5_PERCENT 0x22
96 #define KEY_6_CARET 0x23
97 #define KEY_7_AMPERSAND 0x24
98 #define KEY_8_ASTERISK 0x25
99 #define KEY_9_OPARENTHESIS 0x26
100 #define KEY_0_CPARENTHESIS 0x27
101 #define KEY_ENTER 0x28
102 #define KEY_ESCAPE 0x29
103 #define KEY_BACKSPACE 0x2A
104 #define KEY_TAB 0x2B
105 #define KEY_SPACEBAR 0x2C
106 #define KEY_MINUS_UNDERSCORE 0x2D
107 #define KEY_EQUAL_PLUS 0x2E
108 #define KEY_OBRACKET_AND_OBRACE 0x2F
109 #define KEY_CBRACKET_AND_CBRACE 0x30
110 #define KEY_BACKSLASH_VERTICAL_BAR 0x31
111 #define KEY_NONUS_NUMBER_SIGN_TILDE 0x32
112 #define KEY_SEMICOLON_COLON 0x33
113 #define KEY_SINGLE_AND_DOUBLE_QUOTE 0x34
114 #define KEY_GRAVE ACCENT AND TILDE 0x35
115 #define KEY_COMMA_AND_LESS 0x36
116 #define KEY_DOT_GREATER 0x37
117 #define KEY_SLASH_QUESTION 0x38
118 #define KEY_CAPS LOCK 0x39
119 #define KEY_F1 0x3A
120 #define KEY_F2 0x3B
121 #define KEY_F3 0x3C
122 #define KEY_F4 0x3D
123 #define KEY_F5 0x3E
124 #define KEY_F6 0x3F
125 #define KEY_F7 0x40
126 #define KEY_F8 0x41
127 #define KEY_F9 0x42
128 #define KEY_F10 0x43
129 #define KEY_F11 0x44
130 #define KEY_F12 0x45
131 #define KEY_PRINTSCREEN 0x46
132 #define KEY_SCROLL LOCK 0x47
133 #define KEY_PAUSE 0x48
134 #define KEY_INSERT 0x49
135 #define KEY_HOME 0x4A
136 #define KEY_PAGEUP 0x4B
137 #define KEY_DELETE 0x4C
138 #define KEY_END1 0x4D
139 #define KEY_PAGEDOWN 0x4E
140 #define KEY_RIGHTARROW 0x4F
141 #define KEY_LEFTARROW 0x50
142 #define KEY_DOWNARROW 0x51
143 #define KEY_UPARROW 0x52
144 #define KEY_KEYPAD_NUM_LOCK_AND_CLEAR 0x53
145 #define KEY_KEYPAD_SLASH 0x54
146 #define KEY_KEYPAD_ASTERIKS 0x55
147 #define KEY_KEYPAD_MINUS 0x56
148 #define KEY_KEYPAD_PLUS 0x57
149 #define KEY_KEYPAD_ENTER 0x58
150 #define KEY_KEYPAD_1_END 0x59
151 #define KEY_KEYPAD_2_DOWN_ARROW 0x5A
152 #define KEY_KEYPAD_3_PAGEDN 0x5B
153 #define KEY_KEYPAD_4_LEFT_ARROW 0x5C
154 #define KEY_KEYPAD_5 0x5D
155 #define KEY_KEYPAD_6_RIGHT_ARROW 0x5E
156 #define KEY_KEYPAD_7_HOME 0x5F
157 #define KEY_KEYPAD_8_UP_ARROW 0x60
158 #define KEY_KEYPAD_9_PAGEUP 0x61
159 #define KEY_KEYPAD_0_INSERT 0x62
160 #define KEY_KEYPAD_DECIMAL_SEPARATOR_DELETE 0x63
161 #define KEY_NONUS_BACK_SLASH_VERTICAL_BAR 0x64
162 #define KEY_APPLICATION 0x65
163 #define KEY_POWER 0x66
164 #define KEY_KEYPAD_EQUAL 0x67
165 #define KEY_F13 0x68
166 #define KEY_F14 0x69
167 #define KEY_F15 0x6A
168 #define KEY_F16 0x6B
169 #define KEY_F17 0x6C
170 #define KEY_F18 0x6D
171 #define KEY_F19 0x6E
172 #define KEY_F20 0x6F
173 #define KEY_F21 0x70
174 #define KEY_F22 0x71
175 #define KEY_F23 0x72
176 #define KEY_F24 0x73
177 #define KEY_EXECUTE 0x74
178 #define KEY_HELP 0x75
179 #define KEY_MENU 0x76
180 #define KEY_SELECT 0x77
181 #define KEY_STOP 0x78
182 #define KEY_AGAIN 0x79
183 #define KEY_UNDO 0x7A
184 #define KEY_CUT 0x7B
185 #define KEY_COPY 0x7C
186 #define KEY_PASTE 0x7D
187 #define KEY_FIND 0x7E
188 #define KEY_MUTE 0x7F
189 #define KEY_VOLUME_UP 0x80
190 #define KEY_VOLUME_DOWN 0x81
191 #define KEY_LOCKING_CAPS_LOCK 0x82
192 #define KEY_LOCKING_NUM_LOCK 0x83
193 #define KEY_LOCKING_SCROLL_LOCK 0x84
194 #define KEY_KEYPAD_COMMA 0x85
195 #define KEY_KEYPAD_EQUAL_SIGN 0x86
196 #define KEY_INTERNATIONAL1 0x87
197 #define KEY_INTERNATIONAL2 0x88
198 #define KEY_INTERNATIONAL3 0x89
199 #define KEY_INTERNATIONAL4 0x8A
200 #define KEY_INTERNATIONAL5 0x8B
201 #define KEY_INTERNATIONAL6 0x8C
202 #define KEY_INTERNATIONAL7 0x8D
203 #define KEY_INTERNATIONAL8 0x8E
204 #define KEY_INTERNATIONAL9 0x8F
205 #define KEY_LANG1 0x90
206 #define KEY_LANG2 0x91
207 #define KEY_LANG3 0x92
208 #define KEY_LANG4 0x93
209 #define KEY_LANG5 0x94
210 #define KEY_LANG6 0x95
211 #define KEY_LANG7 0x96
212 #define KEY_LANG8 0x97
213 #define KEY_LANG9 0x98
214 #define KEY_ALTERNATE_ERASE 0x99
215 #define KEY_SYSREQ 0x9A
216 #define KEY_CANCEL 0x9B
217 #define KEY_CLEAR 0x9C
218 #define KEY_PRIOR 0x9D
219 #define KEY_RETURN 0x9E
220 #define KEY_SEPARATOR 0x9F
221 #define KEY_OUT 0xA0
222 #define KEY_OPER 0xA1
223 #define KEY_CLEAR_AGAIN 0xA2
224 #define KEY_CRSEL 0xA3
225 #define KEY_EXSEL 0xA4
226 #define KEY_KEYPAD_00 0xB0
227 #define KEY_KEYPAD_000 0xB1
228 #define KEY_THOUSANDS_SEPARATOR 0xB2
229 #define KEY_DECIMAL_SEPARATOR 0xB3
230 #define KEY_CURRENCY_UNIT 0xB4
231 #define KEY_CURRENCY_SUB_UNIT 0xB5
232 #define KEY_KEYPAD_OPARENTHESIS 0xB6
233 #define KEY_KEYPAD_CPARENTHESIS 0xB7
234 #define KEY_KEYPAD_OBRACE 0xB8
235 #define KEY_KEYPAD_CBRACE 0xB9
236 #define KEY_KEYPAD_TAB 0xBA
237 #define KEY_KEYPAD_BACKSPACE 0xBB
238 #define KEY_KEYPAD_A 0xBC
239 #define KEY_KEYPAD_B 0xBD
240 #define KEY_KEYPAD_C 0xBE
241 #define KEY_KEYPAD_D 0xBF
242 #define KEY_KEYPAD_E 0xC0
243 #define KEY_KEYPAD_F 0xC1
244 #define KEY_KEYPAD_XOR 0xC2
245 #define KEY_KEYPAD_CARET 0xC3
246 #define KEY_KEYPAD_PERCENT 0xC4
247 #define KEY_KEYPAD_LESS 0xC5
248 #define KEY_KEYPAD_GREATER 0xC6
249 #define KEY_KEYPAD_AMPERSAND 0xC7
250 #define KEY_KEYPAD_LOGICAL_AND 0xC8
251 #define KEY_KEYPAD_VERTICAL_BAR 0xC9
252 #define KEY_KEYPAD_LOGIACL_OR 0xCA
253 #define KEY_KEYPAD_COLON 0xCB
254 #define KEY_KEYPAD_NUMBER_SIGN 0xCC
255 #define KEY_KEYPAD_SPACE 0xCD
256 #define KEY_KEYPAD_AT 0xCE
257 #define KEY_KEYPAD_EXCLAMATION_MARK 0xCF
258 #define KEY_KEYPAD_MEMORY_STORE 0xD0
259 #define KEY_KEYPAD_MEMORY_RECALL 0xD1
260 #define KEY_KEYPAD_MEMORY_CLEAR 0xD2
261 #define KEY_KEYPAD_MEMORY_ADD 0xD3
262 #define KEY_KEYPAD_MEMORY_SUBTRACT 0xD4
263 #define KEY_KEYPAD_MEMORY_MULTIPLY 0xD5
264 #define KEY_KEYPAD_MEMORY_DIVIDE 0xD6
265 #define KEY_KEYPAD_PLUSMINUS 0xD7
266 #define KEY_KEYPAD_CLEAR 0xD8
267 #define KEY_KEYPAD_CLEAR_ENTRY 0xD9
268 #define KEY_KEYPAD_BINARY 0xDA
269 #define KEY_KEYPAD_OCTAL 0xDB
270 #define KEY_KEYPAD_DECIMAL 0xDC
271 #define KEY_KEYPAD_HEXADECIMAL 0xDD
272 #define KEY_LEFTCONTROL 0xE0
273 #define KEY_LEFTSHIFT 0xE1
274 #define KEY_LEFTALT 0xE2
275 #define KEY_LEFT_GUI 0xE3
276 #define KEY_RIGHTCONTROL 0xE4
277 #define KEY_RIGHTSHIFT 0xE5
278 #define KEY_RIGHTALT 0xE6
279 #define KEY_RIGHT_GUI 0xE7
280 
281 typedef struct
282 {
283  uint8_t state;
284  uint8_t lctrl;
285  uint8_t lshift;
286  uint8_t lalt;
287  uint8_t lgui;
288  uint8_t rctrl;
289  uint8_t rshift;
290  uint8_t ralt;
291  uint8_t rgui;
292  uint8_t keys[6];
293 }
295 
299 
304 #ifdef __cplusplus
305 }
306 #endif
307 
308 #endif /* __USBH_HID_KEYBD_H */
309 
325 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
326 
uint8_t USBH_HID_GetASCIICode(HID_KEYBD_Info_TypeDef *info)
USBH_HID_GetASCIICode The function decode keyboard data into ASCII characters.
This file contains all the prototypes for the usbh_hid_keybd.c.
This file contains all the prototypes for the usbh_hid.c.
USBH_StatusTypeDef USBH_HID_KeybdInit(USBH_HandleTypeDef *phost)
USBH_HID_KeybdInit The function init the HID keyboard.
HID_KEYBD_Info_TypeDef * USBH_HID_GetKeybdInfo(USBH_HandleTypeDef *phost)
USBH_HID_GetKeybdInfo The function return keyboard information.
USBH_StatusTypeDef
Definition: usbh_def.h:302