TianoCore EDK2 master
|
#include "Terminal.h"
Go to the source code of this file.
Variables | |
UNICODE_TO_CHAR | UnicodeToPcAnsiOrAscii [] |
CHAR16 | mSetModeString [] = { ESC, '[', '=', '3', 'h', 0 } |
CHAR16 | mSetAttributeString [] = { ESC, '[', '0', 'm', ESC, '[', '4', '0', 'm', ESC, '[', '4', '0', 'm', 0 } |
CHAR16 | mClearScreenString [] = { ESC, '[', '2', 'J', 0 } |
CHAR16 | mSetCursorPositionString [] = { ESC, '[', '0', '0', ';', '0', '0', 'H', 0 } |
CHAR16 | mCursorForwardString [] = { ESC, '[', '0', '0', 'C', 0 } |
CHAR16 | mCursorBackwardString [] = { ESC, '[', '0', '0', 'D', 0 } |
Implementation for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL protocol.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutClearScreen | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This | ) |
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.ClearScreen(). It clears the ANSI terminal's display to the currently selected background color.
This | Indicates the calling context. |
EFI_SUCCESS | The operation completed successfully. |
EFI_DEVICE_ERROR | The terminal screen cannot be cleared due to serial port error. |
EFI_UNSUPPORTED | The terminal is not in a valid display mode. |
Definition at line 696 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutEnableCursor | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN BOOLEAN | Visible | ||
) |
Implements SIMPLE_TEXT_OUTPUT.EnableCursor().
In this driver, the cursor cannot be hidden.
This | Indicates the calling context. |
Visible | If TRUE, the cursor is set to be visible, If FALSE, the cursor is set to be invisible. |
EFI_SUCCESS | The request is valid. |
EFI_UNSUPPORTED | The terminal does not support cursor hidden. |
Definition at line 835 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutOutputString | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN CHAR16 * | WString | ||
) |
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString().
The Unicode string will be converted to terminal expressible data stream and send to terminal via serial port.
This | Indicates the calling context. |
WString | The Null-terminated Unicode string to be displayed on the terminal screen. |
EFI_SUCCESS | The string is output successfully. |
EFI_DEVICE_ERROR | The serial port fails to send the string out. |
EFI_WARN_UNKNOWN_GLYPH | Indicates that some of the characters in the Unicode string could not be rendered and are skipped. |
EFI_UNSUPPORTED | If current display mode is out of range. |
Definition at line 169 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutQueryMode | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN UINTN | ModeNumber, | ||
OUT UINTN * | Columns, | ||
OUT UINTN * | Rows | ||
) |
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode().
It returns information for an available text mode that the terminal supports.
This | Indicates the calling context. |
ModeNumber | The mode number to return information on. |
Columns | The returned columns of the requested mode. |
Rows | The returned rows of the requested mode. |
EFI_SUCCESS | The requested mode information is returned. |
EFI_UNSUPPORTED | The mode number is not valid. |
Definition at line 429 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutReset | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.Reset().
If ExtendeVerification is TRUE, then perform dependent serial device reset, and set display mode to mode 0. If ExtendedVerification is FALSE, only set display mode to mode 0.
This | Indicates the calling context. |
ExtendedVerification | Indicates that the driver may perform a more exhaustive verification operation of the device during reset. |
EFI_SUCCESS | The reset operation succeeds. |
EFI_DEVICE_ERROR | The terminal is not functioning correctly or the serial port reset fails. |
Definition at line 105 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutSetAttribute | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN UINTN | Attribute | ||
) |
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute().
This | Indicates the calling context. |
Attribute | The attribute to set. Only bit0..6 are valid, all other bits are undefined and must be zero. |
EFI_SUCCESS | The requested attribute is set. |
EFI_DEVICE_ERROR | The requested attribute cannot be set due to serial port error. |
EFI_UNSUPPORTED | The attribute requested is not defined by EFI spec. |
Definition at line 525 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutSetCursorPosition | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN UINTN | Column, | ||
IN UINTN | Row | ||
) |
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetCursorPosition().
This | Indicates the calling context. |
Column | The row to set cursor to. |
Row | The column to set cursor to. |
EFI_SUCCESS | The operation completed successfully. |
EFI_DEVICE_ERROR | The request fails due to serial port error. |
EFI_UNSUPPORTED | The terminal is not in a valid text mode, or the cursor position is invalid for current mode. |
Definition at line 736 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutSetMode | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN UINTN | ModeNumber | ||
) |
Implements EFI_SIMPLE_TEXT_OUT.SetMode().
Set the terminal to a specified display mode. In this driver, we only support mode 0.
This | Indicates the calling context. |
ModeNumber | The text mode to set. |
EFI_SUCCESS | The requested text mode is set. |
EFI_DEVICE_ERROR | The requested text mode cannot be set because of serial device error. |
EFI_UNSUPPORTED | The text mode number is not valid. |
Definition at line 469 of file TerminalConOut.c.
EFI_STATUS EFIAPI TerminalConOutTestString | ( | IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL * | This, |
IN CHAR16 * | WString | ||
) |
Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.TestString().
If one of the characters in the *Wstring is neither valid Unicode drawing characters, not ASCII code, then this function will return EFI_UNSUPPORTED.
This | Indicates the calling context. |
WString | The Null-terminated Unicode string to be tested. |
EFI_SUCCESS | The terminal is capable of rendering the output string. |
EFI_UNSUPPORTED | Some of the characters in the Unicode string cannot be rendered. |
Definition at line 379 of file TerminalConOut.c.
BOOLEAN TerminalIsValidAscii | ( | IN CHAR16 | Ascii | ) |
Detects if a valid ASCII char.
Ascii | An ASCII character. |
TRUE | If it is a valid ASCII character. |
FALSE | If it is not a valid ASCII character. |
Definition at line 903 of file TerminalConOut.c.
BOOLEAN TerminalIsValidEfiCntlChar | ( | IN CHAR16 | CharC | ) |
Detects if a valid EFI control character.
CharC | An input EFI Control character. |
TRUE | If it is a valid EFI control character. |
FALSE | If it is not a valid EFI control character. |
Definition at line 927 of file TerminalConOut.c.
BOOLEAN TerminalIsValidTextGraphics | ( | IN CHAR16 | Graphic, |
OUT CHAR8 *PcAnsi | OPTIONAL, | ||
OUT CHAR8 *Ascii | OPTIONAL | ||
) |
Detects if a Unicode char is for Box Drawing text graphics.
Graphic | Unicode char to test. |
PcAnsi | Optional pointer to return PCANSI equivalent of Graphic. |
Ascii | Optional pointer to return ASCII equivalent of Graphic. |
TRUE | If Graphic is a supported Unicode Box Drawing character. |
Definition at line 860 of file TerminalConOut.c.
CHAR16 mClearScreenString[] = { ESC, '[', '2', 'J', 0 } |
Definition at line 78 of file TerminalConOut.c.
CHAR16 mCursorBackwardString[] = { ESC, '[', '0', '0', 'D', 0 } |
Definition at line 81 of file TerminalConOut.c.
CHAR16 mCursorForwardString[] = { ESC, '[', '0', '0', 'C', 0 } |
Definition at line 80 of file TerminalConOut.c.
CHAR16 mSetAttributeString[] = { ESC, '[', '0', 'm', ESC, '[', '4', '0', 'm', ESC, '[', '4', '0', 'm', 0 } |
Definition at line 77 of file TerminalConOut.c.
CHAR16 mSetCursorPositionString[] = { ESC, '[', '0', '0', ';', '0', '0', 'H', 0 } |
Definition at line 79 of file TerminalConOut.c.
CHAR16 mSetModeString[] = { ESC, '[', '=', '3', 'h', 0 } |
Definition at line 76 of file TerminalConOut.c.
UNICODE_TO_CHAR UnicodeToPcAnsiOrAscii[] |
Definition at line 18 of file TerminalConOut.c.