1) Initialize gBS, gST, gImageHandle in UefiBootServicesTableLib.c to NULL
[mirror_edk2.git] / EdkModulePkg / Bus / Usb / UsbKb / Dxe / keyboard.h
1 /*++
2 Copyright (c) 2006, Intel Corporation
3 All rights reserved. This program and the accompanying materials
4 are licensed and made available under the terms and conditions of the BSD License
5 which accompanies this distribution. The full text of the license may be found at
6 http://opensource.org/licenses/bsd-license.php
7
8 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
9 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
10
11 Module Name:
12
13 Keyboard.h
14
15 Abstract:
16
17 Function prototype for USB Keyboard Driver
18
19 Revision History
20 --*/
21
22 #ifndef _KEYBOARD_H
23 #define _KEYBOARD_H
24
25 #include "efikey.h"
26
27 //
28 // EFI Component Name Functions
29 //
30 EFI_STATUS
31 EFIAPI
32 UsbKeyboardComponentNameGetDriverName (
33 IN EFI_COMPONENT_NAME_PROTOCOL *This,
34 IN CHAR8 *Language,
35 OUT CHAR16 **DriverName
36 );
37
38 EFI_STATUS
39 EFIAPI
40 UsbKeyboardComponentNameGetControllerName (
41 IN EFI_COMPONENT_NAME_PROTOCOL *This,
42 IN EFI_HANDLE ControllerHandle,
43 IN EFI_HANDLE ChildHandle OPTIONAL,
44 IN CHAR8 *Language,
45 OUT CHAR16 **ControllerName
46 );
47
48 BOOLEAN
49 IsUSBKeyboard (
50 IN EFI_USB_IO_PROTOCOL *UsbIo
51 );
52
53 EFI_STATUS
54 InitUSBKeyboard (
55 IN USB_KB_DEV *UsbKeyboardDevice
56 );
57
58 EFI_STATUS
59 EFIAPI
60 KeyboardHandler (
61 IN VOID *Data,
62 IN UINTN DataLength,
63 IN VOID *Context,
64 IN UINT32 Result
65 );
66
67 VOID
68 EFIAPI
69 USBKeyboardRecoveryHandler (
70 IN EFI_EVENT Event,
71 IN VOID *Context
72 );
73
74 EFI_STATUS
75 USBParseKey (
76 IN OUT USB_KB_DEV *UsbKeyboardDevice,
77 OUT UINT8 *KeyChar
78 );
79
80 EFI_STATUS
81 USBKeyCodeToEFIScanCode (
82 IN USB_KB_DEV *UsbKeyboardDevice,
83 IN UINT8 KeyChar,
84 OUT EFI_INPUT_KEY *Key
85 );
86
87 EFI_STATUS
88 InitUSBKeyBuffer (
89 IN OUT USB_KB_BUFFER *KeyboardBuffer
90 );
91
92 BOOLEAN
93 IsUSBKeyboardBufferEmpty (
94 IN USB_KB_BUFFER *KeyboardBuffer
95 );
96
97 BOOLEAN
98 IsUSBKeyboardBufferFull (
99 IN USB_KB_BUFFER *KeyboardBuffer
100 );
101
102 EFI_STATUS
103 InsertKeyCode (
104 IN OUT USB_KB_BUFFER *KeyboardBuffer,
105 IN UINT8 Key,
106 IN UINT8 Down
107 );
108
109 EFI_STATUS
110 RemoveKeyCode (
111 IN OUT USB_KB_BUFFER *KeyboardBuffer,
112 OUT USB_KEY *UsbKey
113 );
114
115 VOID
116 EFIAPI
117 USBKeyboardRepeatHandler (
118 IN EFI_EVENT Event,
119 IN VOID *Context
120 );
121
122 EFI_STATUS
123 SetKeyLED (
124 IN USB_KB_DEV *UsbKeyboardDevice
125 );
126
127 #endif