X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdePkg%2FInclude%2FProtocol%2FSimpleTextIn.h;h=e22e05ee4aadc26bb09242fc48de648a05d9dc22;hp=ad23b5ab5c6ae6907aff3c55773afe8ab8ea4309;hb=9344f0921518309295da89c221d10cbead8531aa;hpb=3f748e529cb13841e12d0bfdf8446db7763a3f20 diff --git a/MdePkg/Include/Protocol/SimpleTextIn.h b/MdePkg/Include/Protocol/SimpleTextIn.h index ad23b5ab5c..e22e05ee4a 100644 --- a/MdePkg/Include/Protocol/SimpleTextIn.h +++ b/MdePkg/Include/Protocol/SimpleTextIn.h @@ -1,44 +1,37 @@ /** @file - Simple Text In protocol from the UEFI 2.0 specification. + Simple Text Input protocol from the UEFI 2.0 specification. Abstraction of a very simple input device like a keyboard or serial terminal. - Copyright (c) 2006, Intel Corporation - All rights reserved. This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+ SPDX-License-Identifier: BSD-2-Clause-Patent **/ #ifndef __SIMPLE_TEXT_IN_PROTOCOL_H__ #define __SIMPLE_TEXT_IN_PROTOCOL_H__ -#include - #define EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID \ { \ 0x387477c1, 0x69c7, 0x11d2, {0x8e, 0x39, 0x0, 0xa0, 0xc9, 0x69, 0x72, 0x3b } \ } -// -// Protocol GUID defined in EFI1.1. -// -#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID - typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL; -// -// Backward-compatible with EFI1.1. -// +/// +/// Protocol GUID name defined in EFI1.1. +/// +#define SIMPLE_INPUT_PROTOCOL EFI_SIMPLE_TEXT_INPUT_PROTOCOL_GUID + +/// +/// Protocol name in EFI1.1 for backward-compatible. +/// typedef struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL SIMPLE_INPUT_INTERFACE; -// -// Data structures -// + +/// +/// The keystroke information for the key that was pressed. +/// typedef struct { UINT16 ScanCode; CHAR16 UnicodeChar; @@ -47,7 +40,6 @@ typedef struct { // // Required unicode control chars // -#define CHAR_NULL 0x0000 #define CHAR_BACKSPACE 0x0008 #define CHAR_TAB 0x0009 #define CHAR_LINEFEED 0x000A @@ -77,12 +69,10 @@ typedef struct { #define SCAN_F8 0x0012 #define SCAN_F9 0x0013 #define SCAN_F10 0x0014 -#define SCAN_F11 0x0015 -#define SCAN_F12 0x0016 #define SCAN_ESC 0x0017 /** - Reset the input device and optionaly run diagnostics + Reset the input device and optionally run diagnostics @param This Protocol instance pointer. @param ExtendedVerification Driver may perform diagnostics on reset. @@ -93,36 +83,42 @@ typedef struct { **/ typedef EFI_STATUS -(EFIAPI *EFI_INPUT_RESET) ( +(EFIAPI *EFI_INPUT_RESET)( IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, IN BOOLEAN ExtendedVerification - ) -; + ); /** - Reads the next keystroke from the input device. The WaitForKey Event can - be used to test for existance of a keystroke via WaitForEvent () call. + Reads the next keystroke from the input device. The WaitForKey Event can + be used to test for existence of a keystroke via WaitForEvent () call. - @param This Protocol instance pointer. - @param Key Driver may perform diagnostics on reset. + @param This Protocol instance pointer. + @param Key A pointer to a buffer that is filled in with the keystroke + information for the key that was pressed. @retval EFI_SUCCESS The keystroke information was returned. - @retval EFI_NOT_READY There was no keystroke data availiable. - @retval EFI_DEVICE_ERROR The keydtroke information was not returned due to + @retval EFI_NOT_READY There was no keystroke data available. + @retval EFI_DEVICE_ERROR The keystroke information was not returned due to hardware errors. **/ typedef EFI_STATUS -(EFIAPI *EFI_INPUT_READ_KEY) ( +(EFIAPI *EFI_INPUT_READ_KEY)( IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This, OUT EFI_INPUT_KEY *Key - ) -; + ); +/// +/// The EFI_SIMPLE_TEXT_INPUT_PROTOCOL is used on the ConsoleIn device. +/// It is the minimum required protocol for ConsoleIn. +/// struct _EFI_SIMPLE_TEXT_INPUT_PROTOCOL { EFI_INPUT_RESET Reset; EFI_INPUT_READ_KEY ReadKeyStroke; + /// + /// Event to use with WaitForEvent() to wait for a key to be available + /// EFI_EVENT WaitForKey; };