]> git.proxmox.com Git - mirror_edk2.git/blob - MdeModulePkg/Bus/Usb/UsbKbDxe/keyboard.h
usb kb's bug fix
[mirror_edk2.git] / MdeModulePkg / Bus / Usb / UsbKbDxe / keyboard.h
1 /** @file
2 Copyright (c) 2004 - 2005, 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
23 #ifndef _KEYBOARD_H
24 #define _KEYBOARD_H
25
26
27 #include "efikey.h"
28
29 BOOLEAN
30 IsUSBKeyboard (
31 IN EFI_USB_IO_PROTOCOL *UsbIo
32 );
33
34 EFI_STATUS
35 InitUSBKeyboard (
36 IN USB_KB_DEV *UsbKeyboardDevice
37 );
38
39 EFI_STATUS
40 EFIAPI
41 KeyboardHandler (
42 IN VOID *Data,
43 IN UINTN DataLength,
44 IN VOID *Context,
45 IN UINT32 Result
46 );
47
48 VOID
49 EFIAPI
50 USBKeyboardRecoveryHandler (
51 IN EFI_EVENT Event,
52 IN VOID *Context
53 );
54
55 EFI_STATUS
56 USBParseKey (
57 IN OUT USB_KB_DEV *UsbKeyboardDevice,
58 OUT UINT8 *KeyChar
59 );
60
61 EFI_STATUS
62 USBKeyCodeToEFIScanCode (
63 IN USB_KB_DEV *UsbKeyboardDevice,
64 IN UINT8 KeyChar,
65 OUT EFI_INPUT_KEY *Key
66 );
67
68 EFI_STATUS
69 InitUSBKeyBuffer (
70 IN OUT USB_KB_BUFFER *KeyboardBuffer
71 );
72
73 BOOLEAN
74 IsUSBKeyboardBufferEmpty (
75 IN USB_KB_BUFFER *KeyboardBuffer
76 );
77
78 BOOLEAN
79 IsUSBKeyboardBufferFull (
80 IN USB_KB_BUFFER *KeyboardBuffer
81 );
82
83 EFI_STATUS
84 InsertKeyCode (
85 IN OUT USB_KB_BUFFER *KeyboardBuffer,
86 IN UINT8 Key,
87 IN UINT8 Down
88 );
89
90 EFI_STATUS
91 RemoveKeyCode (
92 IN OUT USB_KB_BUFFER *KeyboardBuffer,
93 OUT USB_KEY *UsbKey
94 );
95
96 VOID
97 EFIAPI
98 USBKeyboardRepeatHandler (
99 IN EFI_EVENT Event,
100 IN VOID *Context
101 );
102
103 EFI_STATUS
104 SetKeyLED (
105 IN USB_KB_DEV *UsbKeyboardDevice
106 );
107
108 #endif