iPXE
SimpleTextIn.h
Go to the documentation of this file.
1 /** @file
2  Simple Text Input protocol from the UEFI 2.0 specification.
3 
4  Abstraction of a very simple input device like a keyboard or serial
5  terminal.
6 
7  Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.<BR>
8  SPDX-License-Identifier: BSD-2-Clause-Patent
9 
10 **/
11 
12 #ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__
13 #define __SIMPLE_TEXT_IN_PROTOCOL_H__
14 
15 FILE_LICENCE ( BSD2_PATENT );
16 FILE_SECBOOT ( PERMITTED );
17 
18 #define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \
19  { \
20  0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \
21  }
22 
24 
25 ///
26 /// Protocol GUID name defined in EFI1.1.
27 ///
28 #define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID
29 
30 ///
31 /// Protocol name in EFI1.1 for backward-compatible.
32 ///
34 
35 ///
36 /// The keystroke information for the key that was pressed.
37 ///
38 typedef struct {
42 
43 //
44 // Required unicode control chars
45 //
46 #define CHAR_BACKSPACE 0x0008
47 #define CHAR_TAB 0x0009
48 #define CHAR_LINEFEED 0x000A
49 #define CHAR_CARRIAGE_RETURN 0x000D
50 
51 //
52 // EFI Scan codes
53 //
54 #define SCAN_NULL 0x0000
55 #define SCAN_UP 0x0001
56 #define SCAN_DOWN 0x0002
57 #define SCAN_RIGHT 0x0003
58 #define SCAN_LEFT 0x0004
59 #define SCAN_HOME 0x0005
60 #define SCAN_END 0x0006
61 #define SCAN_INSERT 0x0007
62 #define SCAN_DELETE 0x0008
63 #define SCAN_PAGE_UP 0x0009
64 #define SCAN_PAGE_DOWN 0x000A
65 #define SCAN_F1 0x000B
66 #define SCAN_F2 0x000C
67 #define SCAN_F3 0x000D
68 #define SCAN_F4 0x000E
69 #define SCAN_F5 0x000F
70 #define SCAN_F6 0x0010
71 #define SCAN_F7 0x0011
72 #define SCAN_F8 0x0012
73 #define SCAN_F9 0x0013
74 #define SCAN_F10 0x0014
75 #define SCAN_ESC 0x0017
76 
77 /**
78  Reset the input device and optionally run diagnostics
79 
80  @param This Protocol instance pointer.
81  @param ExtendedVerification Driver may perform diagnostics on reset.
82 
83  @retval EFI_SUCCESS The device was reset.
84  @retval EFI_DEVICE_ERROR The device is not functioning properly and could not be reset.
85 
86 **/
87 typedef
91  IN BOOLEAN ExtendedVerification
92  );
93 
94 /**
95  Reads the next keystroke from the input device. The WaitForKey Event can
96  be used to test for existence of a keystroke via WaitForEvent () call.
97 
98  @param This Protocol instance pointer.
99  @param Key A pointer to a buffer that is filled in with the keystroke
100  information for the key that was pressed.
101 
102  @retval EFI_SUCCESS The keystroke information was returned.
103  @retval EFI_NOT_READY There was no keystroke data available.
104  @retval EFI_DEVICE_ERROR The keystroke information was not returned due to
105  hardware errors.
106  @retval EFI_UNSUPPORTED The device does not support the ability to read keystroke data.
107 
108 **/
109 typedef
113  OUT EFI_INPUT_KEY *Key
114  );
115 
116 ///
117 /// The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device.
118 /// It is the minimum required protocol for ConsoleIn.
119 ///
123  ///
124  /// Event to use with WaitForEvent() to wait for a key to be available
125  ///
127 };
128 
130 
131 #endif
128 bit buffer containing a unique identifier value.
Definition: Base.h:216
Definition: efi.h:63
The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device.
Definition: SimpleTextIn.h:120
unsigned char BOOLEAN
unsigned short CHAR16
EFI_EVENT WaitForKey
Event to use with WaitForEvent() to wait for a key to be available.
Definition: SimpleTextIn.h:126
CHAR16 UnicodeChar
Definition: SimpleTextIn.h:40
#define OUT
Definition: mlx_utils.h:29
EFI_INPUT_READ_KEY ReadKeyStroke
Definition: SimpleTextIn.h:122
FILE_LICENCE(BSD2_PATENT)
unsigned short UINT16
#define EFIAPI
EFI_GUID gEfiSimpleTextInProtocolGuid
The keystroke information for the key that was pressed.
Definition: SimpleTextIn.h:38
UINT16 ScanCode
Definition: SimpleTextIn.h:39
EFI_STATUS(EFIAPI * EFI_INPUT_RESET)(IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification)
Reset the input device and optionally run diagnostics.
Definition: SimpleTextIn.h:89
FILE_SECBOOT(PERMITTED)
#define IN
Definition: mlx_utils.h:28
RETURN_STATUS EFI_STATUS
Function return status for EFI API.
Definition: UefiBaseType.h:32
EFI_STATUS(EFIAPI * EFI_INPUT_READ_KEY)(IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, OUT EFI_INPUT_KEY *Key)
Reads the next keystroke from the input device.
Definition: SimpleTextIn.h:111