TianoCore EDK2 master
Loading...
Searching...
No Matches
KeyBoard.h
Go to the documentation of this file.
1
9#ifndef _EFI_KEYBOARD_H_
10#define _EFI_KEYBOARD_H_
11
12#include "EfiKey.h"
13
14#define USB_KEYBOARD_KEY_COUNT 105
15
16#define USB_KEYBOARD_LANGUAGE_STR_LEN 5 // RFC4646 Language Code: "en-US"
17#define USB_KEYBOARD_DESCRIPTION_STR_LEN (16 + 1) // Description: "English Keyboard"
18
19#pragma pack (1)
20typedef struct {
21 //
22 // This 4-bytes total array length is required by PreparePackageList()
23 //
24 UINT32 Length;
25
26 //
27 // Keyboard Layout package definition
28 //
29 EFI_HII_PACKAGE_HEADER PackageHeader;
30 UINT16 LayoutCount;
31
32 //
33 // EFI_HII_KEYBOARD_LAYOUT
34 //
35 UINT16 LayoutLength;
36 EFI_GUID Guid;
37 UINT32 LayoutDescriptorStringOffset;
38 UINT8 DescriptorCount;
39 EFI_KEY_DESCRIPTOR KeyDescriptor[USB_KEYBOARD_KEY_COUNT];
40 UINT16 DescriptionCount;
41 CHAR16 Language[USB_KEYBOARD_LANGUAGE_STR_LEN];
42 CHAR16 Space;
43 CHAR16 DescriptionString[USB_KEYBOARD_DESCRIPTION_STR_LEN];
45#pragma pack()
46
56BOOLEAN
59 );
60
72 IN OUT USB_KB_DEV *UsbKeyboardDevice
73 );
74
92 OUT USB_KB_DEV *UsbKeyboardDevice
93 );
94
101VOID
103 IN OUT USB_KB_DEV *UsbKeyboardDevice
104 );
105
125EFIAPI
127 IN VOID *Data,
128 IN UINTN DataLength,
129 IN VOID *Context,
130 IN UINT32 Result
131 );
132
146VOID
147EFIAPI
149 IN EFI_EVENT Event,
150 IN VOID *Context
151 );
152
168 IN OUT USB_KB_DEV *UsbKeyboardDevice,
169 OUT UINT8 *KeyCode
170 );
171
190 IN USB_KB_DEV *UsbKeyboardDevice,
191 IN UINT8 KeyCode,
192 OUT EFI_KEY_DATA *KeyData
193 );
194
202VOID
203InitQueue (
204 IN OUT USB_SIMPLE_QUEUE *Queue,
205 IN UINTN ItemSize
206 );
207
213VOID
215 IN OUT USB_SIMPLE_QUEUE *Queue
216 );
217
227BOOLEAN
229 IN USB_SIMPLE_QUEUE *Queue
230 );
231
241BOOLEAN
243 IN USB_SIMPLE_QUEUE *Queue
244 );
245
253VOID
254Enqueue (
255 IN OUT USB_SIMPLE_QUEUE *Queue,
256 IN VOID *Item,
257 IN UINTN ItemSize
258 );
259
272Dequeue (
273 IN OUT USB_SIMPLE_QUEUE *Queue,
274 OUT VOID *Item,
275 IN UINTN ItemSize
276 );
277
291VOID
292EFIAPI
294 IN EFI_EVENT Event,
295 IN VOID *Context
296 );
297
304VOID
305SetKeyLED (
306 IN USB_KB_DEV *UsbKeyboardDevice
307 );
308
315VOID
317 IN USB_KB_DEV *UsbKeyboardDevice,
318 OUT EFI_KEY_STATE *KeyState
319 );
320
321#endif
UINT64 UINTN
VOID EFIAPI USBKeyboardRepeatHandler(IN EFI_EVENT Event, IN VOID *Context)
Definition: KeyBoard.c:1903
EFI_STATUS EFIAPI KeyboardHandler(IN VOID *Data, IN UINTN DataLength, IN VOID *Context, IN UINT32 Result)
Definition: KeyBoard.c:950
VOID SetKeyLED(IN USB_KB_DEV *UsbKeyboardDevice)
Definition: KeyBoard.c:1859
VOID EFIAPI USBKeyboardRecoveryHandler(IN EFI_EVENT Event, IN VOID *Context)
Definition: KeyBoard.c:1950
VOID DestroyQueue(IN OUT USB_SIMPLE_QUEUE *Queue)
Definition: KeyBoard.c:1743
EFI_STATUS InitUSBKeyboard(IN OUT USB_KB_DEV *UsbKeyboardDevice)
Definition: KeyBoard.c:803
EFI_STATUS Dequeue(IN OUT USB_SIMPLE_QUEUE *Queue, OUT VOID *Item, IN UINTN ItemSize)
Definition: KeyBoard.c:1830
VOID ReleaseKeyboardLayoutResources(IN OUT USB_KB_DEV *UsbKeyboardDevice)
Definition: KeyBoard.c:698
EFI_STATUS USBParseKey(IN OUT USB_KB_DEV *UsbKeyboardDevice, OUT UINT8 *KeyCode)
Definition: KeyBoard.c:1250
VOID InitQueue(IN OUT USB_SIMPLE_QUEUE *Queue, IN UINTN ItemSize)
Definition: KeyBoard.c:1714
VOID Enqueue(IN OUT USB_SIMPLE_QUEUE *Queue, IN VOID *Item, IN UINTN ItemSize)
Definition: KeyBoard.c:1795
VOID InitializeKeyState(IN USB_KB_DEV *UsbKeyboardDevice, OUT EFI_KEY_STATE *KeyState)
Definition: KeyBoard.c:1482
BOOLEAN IsQueueFull(IN USB_SIMPLE_QUEUE *Queue)
Definition: KeyBoard.c:1780
BOOLEAN IsUSBKeyboard(IN EFI_USB_IO_PROTOCOL *UsbIo)
Definition: KeyBoard.c:367
EFI_STATUS UsbKeyCodeToEfiInputKey(IN USB_KB_DEV *UsbKeyboardDevice, IN UINT8 KeyCode, OUT EFI_KEY_DATA *KeyData)
Definition: KeyBoard.c:1564
EFI_STATUS InitKeyboardLayout(OUT USB_KB_DEV *UsbKeyboardDevice)
Definition: KeyBoard.c:737
BOOLEAN IsQueueEmpty(IN USB_SIMPLE_QUEUE *Queue)
Definition: KeyBoard.c:1760
#define IN
Definition: Base.h:279
#define OUT
Definition: Base.h:284
RETURN_STATUS EFI_STATUS
Definition: UefiBaseType.h:29
VOID * EFI_EVENT
Definition: UefiBaseType.h:37
Definition: Base.h:213