]>
git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbKbDxe/KeyBoard.h
3 Function prototype for USB Keyboard Driver.
5 Copyright (c) 2004 - 2008, Intel Corporation
6 All rights reserved. This program and the accompanying materials
7 are licensed and made available under the terms and conditions of the BSD License
8 which accompanies this distribution. The full text of the license may be found at
9 http://opensource.org/licenses/bsd-license.php
11 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
12 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
16 #ifndef _EFI_KEYBOARD_H_
17 #define _EFI_KEYBOARD_H_
23 Uses USB I/O to check whether the device is a USB Keyboard device.
25 @param UsbIo Points to a USB I/O protocol instance.
32 IN EFI_USB_IO_PROTOCOL
*UsbIo
36 Initialize USB Keyboard device and all private data structures.
38 @param UsbKeyboardDevice The USB_KB_DEV instance.
40 @retval EFI_SUCCESS Initialization is successful.
41 @retval EFI_DEVICE_ERROR Configure hardware failed.
47 IN USB_KB_DEV
*UsbKeyboardDevice
51 Initialize USB Keyboard layout.
53 @param UsbKeyboardDevice The USB_KB_DEV instance.
55 @retval EFI_SUCCESS Initialization Success.
56 @retval Other Keyboard layout initial failed.
62 IN USB_KB_DEV
*UsbKeyboardDevice
66 Destroy resources for Keyboard layout.
68 @param UsbKeyboardDevice The USB_KB_DEV instance.
73 ReleaseKeyboardLayoutResources (
74 IN USB_KB_DEV
*UsbKeyboardDevice
78 Handler function for USB Keyboard's asynchronous interrupt transfer.
80 @param Data A pointer to a buffer that is filled with key data which is
81 retrieved via asynchronous interrupt transfer.
82 @param DataLength Indicates the size of the data buffer.
83 @param Context Pointing to USB_KB_DEV instance.
84 @param Result Indicates the result of the asynchronous interrupt transfer.
86 @retval EFI_SUCCESS Handler is successful.
87 @retval EFI_DEVICE_ERROR Hardware Error
100 Timer handler for Delayed Recovery timer.
102 @param Event The Delayed Recovery event.
103 @param Context Points to the USB_KB_DEV instance.
109 USBKeyboardRecoveryHandler (
115 Retrieves a key character after parsing the raw data in keyboard buffer.
117 @param UsbKeyboardDevice The USB_KB_DEV instance.
118 @param KeyChar Points to the Key character after key parsing.
120 @retval EFI_SUCCESS Parse key is successful.
121 @retval EFI_NOT_READY Device is not ready.
127 IN OUT USB_KB_DEV
*UsbKeyboardDevice
,
132 Converts USB Keyboard code to EFI Scan Code.
134 @param UsbKeyboardDevice The USB_KB_DEV instance.
135 @param KeyChar Indicates the key code that will be interpreted.
136 @param Key A pointer to a buffer that is filled in with
137 the keystroke information for the key that
140 @retval EFI_NOT_READY Device is not ready
141 @retval EFI_SUCCESS Success.
146 USBKeyCodeToEFIScanCode (
147 IN USB_KB_DEV
*UsbKeyboardDevice
,
149 OUT EFI_INPUT_KEY
*Key
153 Resets USB Keyboard Buffer.
155 @param KeyboardBuffer Points to the USB Keyboard Buffer.
157 @retval EFI_SUCCESS Init key buffer successfully.
163 IN OUT USB_KB_BUFFER
*KeyboardBuffer
167 Check whether USB Keyboard buffer is empty.
169 @param KeyboardBuffer USB Keyboard Buffer.
171 @retval TRUE Key buffer is empty.
172 @retval FALSE Key buffer is not empty.
177 IsUSBKeyboardBufferEmpty (
178 IN USB_KB_BUFFER
*KeyboardBuffer
182 Check whether USB Keyboard buffer is full.
184 @param KeyboardBuffer USB Keyboard Buffer.
186 @retval TRUE Key buffer is full.
187 @retval FALSE Key buffer is not full.
192 IsUSBKeyboardBufferFull (
193 IN USB_KB_BUFFER
*KeyboardBuffer
197 Inserts a key code into keyboard buffer.
199 @param KeyboardBuffer Points to the USB Keyboard Buffer.
201 @param Down Special key
203 @retval EFI_SUCCESS Success
209 IN OUT USB_KB_BUFFER
*KeyboardBuffer
,
215 Pops a key code off from keyboard buffer.
217 @param KeyboardBuffer Points to the USB Keyboard Buffer.
218 @param UsbKey Points to the buffer that contains a usb key code.
220 @retval EFI_SUCCESS Success
221 @retval EFI_DEVICE_ERROR Hardware Error
227 IN OUT USB_KB_BUFFER
*KeyboardBuffer
,
232 Timer handler for Repeat Key timer.
234 @param Event The Repeat Key event.
235 @param Context Points to the USB_KB_DEV instance.
241 USBKeyboardRepeatHandler (
247 Sets USB Keyboard LED state.
249 @param UsbKeyboardDevice The USB_KB_DEV instance.
251 @retval EFI_SUCCESS Success
257 IN USB_KB_DEV
*UsbKeyboardDevice