\r
**/\r
\r
-#ifndef _TERMINAL_H\r
-#define _TERMINAL_H\r
+#ifndef _TERMINAL_H_\r
+#define _TERMINAL_H_\r
\r
\r
#include <PiDxe.h>\r
UINT8 Utf8_3[3];\r
} UTF8_CHAR;\r
\r
-#define PcAnsiType 0\r
-#define VT100Type 1\r
-#define VT100PlusType 2\r
-#define VTUTF8Type 3\r
+#define PCANSITYPE 0\r
+#define VT100TYPE 1\r
+#define VT100PLUSTYPE 2\r
+#define VTUTF8TYPE 3\r
\r
#define LEFTOPENBRACKET 0x5b // '['\r
#define ACAP 0x41\r
extern EFI_COMPONENT_NAME2_PROTOCOL gTerminalComponentName2;\r
\r
extern EFI_GUID gSimpleTextInExNotifyGuid;\r
-//\r
-// Prototypes\r
-//\r
+\r
+/**\r
+ The user Entry Point for module Terminal. The user code starts with this function.\r
+\r
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.\r
+ @param[in] SystemTable A pointer to the EFI System Table.\r
+\r
+ @retval EFI_SUCCESS The entry point is executed successfully.\r
+ @retval other Some error occurs when executing this entry point.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
InitializeTerminal (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.Reset().\r
+ This driver only perform dependent serial device reset regardless of\r
+ the value of ExtendeVerification\r
+\r
+ @param This Indicates the calling context.\r
+ @param ExtendedVerification Skip by this driver.\r
+\r
+ @return EFI_SUCCESS\r
+ @return The reset operation succeeds.\r
+ @return EFI_DEVICE_ERROR\r
+ @return The dependent serial port reset fails.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConInReset (\r
)\r
;\r
\r
+\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_INPUT_PROTOCOL.ReadKeyStroke().\r
+\r
+ @param This Indicates the calling context.\r
+ @param Key A pointer to a buffer that is filled in with the\r
+ keystroke information for the key that was sent\r
+ from terminal.\r
+\r
+ @return EFI_SUCCESS\r
+ @return The keystroke information is returned successfully.\r
+ @return EFI_NOT_READY\r
+ @return There is no keystroke data available.\r
+ @return EFI_DEVICE_ERROR\r
+ @return The dependent serial device encounters error.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConInReadKeyStroke (\r
;\r
\r
\r
+/**\r
+\r
+ @param RegsiteredData A pointer to a buffer that is filled in with the\r
+ keystroke state data for the key that was\r
+ registered.\r
+ @param InputData A pointer to a buffer that is filled in with the\r
+ keystroke state data for the key that was\r
+ pressed.\r
+\r
+ @retval TRUE Key be pressed matches a registered key.\r
+ @retval FLASE Match failed.\r
+\r
+**/\r
BOOLEAN\r
IsKeyRegistered (\r
IN EFI_KEY_DATA *RegsiteredData,\r
IN EFI_KEY_DATA *InputData\r
)\r
-/*++\r
-\r
-Routine Description:\r
-\r
-Arguments:\r
+;\r
\r
- RegsiteredData - A pointer to a buffer that is filled in with the keystroke\r
- state data for the key that was registered.\r
- InputData - A pointer to a buffer that is filled in with the keystroke\r
- state data for the key that was pressed.\r
+/**\r
+ Event notification function for EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event\r
+ Signal the event if there is key available\r
\r
-Returns:\r
- TRUE - Key be pressed matches a registered key.\r
- FLASE - Match failed.\r
+ @param Event Indicates the event that invoke this function.\r
+ @param Context Indicates the calling context.\r
\r
---*/\r
-;\r
+ @return none.\r
\r
+**/\r
VOID\r
EFIAPI\r
TerminalConInWaitForKeyEx (\r
IN VOID *Context\r
)\r
;\r
+\r
//\r
// Simple Text Input Ex protocol prototypes\r
//\r
\r
+/**\r
+ Reset the input device and optionaly run diagnostics\r
+\r
+ @param This Protocol instance pointer.\r
+ @param ExtendedVerification Driver may perform diagnostics on reset.\r
+\r
+ @retval EFI_SUCCESS The device was reset.\r
+ @retval EFI_DEVICE_ERROR The device is not functioning properly and could\r
+ not be reset.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConInResetEx (\r
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
IN BOOLEAN ExtendedVerification\r
)\r
-/*++\r
+;\r
\r
- Routine Description:\r
- Reset the input device and optionaly run diagnostics\r
+/**\r
+ Reads the next keystroke from the input device. The WaitForKey Event can\r
+ be used to test for existance of a keystroke via WaitForEvent () call.\r
\r
- Arguments:\r
- This - Protocol instance pointer.\r
- ExtendedVerification - Driver may perform diagnostics on reset.\r
+ @param This Protocol instance pointer.\r
+ @param KeyData A pointer to a buffer that is filled in with the\r
+ keystroke state data for the key that was\r
+ pressed.\r
\r
- Returns:\r
- EFI_SUCCESS - The device was reset.\r
- EFI_DEVICE_ERROR - The device is not functioning properly and could\r
- not be reset.\r
-\r
---*/\r
-;\r
+ @retval EFI_SUCCESS The keystroke information was returned.\r
+ @retval EFI_NOT_READY There was no keystroke data availiable.\r
+ @retval EFI_DEVICE_ERROR The keystroke information was not returned due\r
+ to hardware errors.\r
+ @retval EFI_INVALID_PARAMETER KeyData is NULL.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConInReadKeyStrokeEx (\r
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
OUT EFI_KEY_DATA *KeyData\r
)\r
-/*++\r
-\r
- Routine Description:\r
- Reads the next keystroke from the input device. The WaitForKey Event can\r
- be used to test for existance of a keystroke via WaitForEvent () call.\r
+;\r
\r
- Arguments:\r
- This - Protocol instance pointer.\r
- KeyData - A pointer to a buffer that is filled in with the keystroke\r
- state data for the key that was pressed.\r
+/**\r
+ Set certain state for the input device.\r
\r
- Returns:\r
- EFI_SUCCESS - The keystroke information was returned.\r
- EFI_NOT_READY - There was no keystroke data availiable.\r
- EFI_DEVICE_ERROR - The keystroke information was not returned due to\r
- hardware errors.\r
- EFI_INVALID_PARAMETER - KeyData is NULL.\r
+ @param This Protocol instance pointer.\r
+ @param KeyToggleState A pointer to the EFI_KEY_TOGGLE_STATE to set the\r
+ state for the input device.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS The device state was set successfully.\r
+ @retval EFI_DEVICE_ERROR The device is not functioning correctly and\r
+ could not have the setting adjusted.\r
+ @retval EFI_UNSUPPORTED The device does not have the ability to set its\r
+ state.\r
+ @retval EFI_INVALID_PARAMETER KeyToggleState is NULL.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConInSetState (\r
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
IN EFI_KEY_TOGGLE_STATE *KeyToggleState\r
)\r
-/*++\r
-\r
- Routine Description:\r
- Set certain state for the input device.\r
-\r
- Arguments:\r
- This - Protocol instance pointer.\r
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the\r
- state for the input device.\r
-\r
- Returns:\r
- EFI_SUCCESS - The device state was set successfully.\r
- EFI_DEVICE_ERROR - The device is not functioning correctly and could\r
- not have the setting adjusted.\r
- EFI_UNSUPPORTED - The device does not have the ability to set its state.\r
- EFI_INVALID_PARAMETER - KeyToggleState is NULL.\r
-\r
---*/\r
;\r
\r
+/**\r
+ Register a notification function for a particular keystroke for the input device.\r
+\r
+ @param This Protocol instance pointer.\r
+ @param KeyData A pointer to a buffer that is filled in with the\r
+ keystroke information data for the key that was\r
+ pressed.\r
+ @param KeyNotificationFunction Points to the function to be called when the key\r
+ sequence is typed specified by KeyData.\r
+ @param NotifyHandle Points to the unique handle assigned to the\r
+ registered notification.\r
+\r
+ @retval EFI_SUCCESS The notification function was registered\r
+ successfully.\r
+ @retval EFI_OUT_OF_RESOURCES Unable to allocate resources for necesssary data\r
+ structures.\r
+ @retval EFI_INVALID_PARAMETER KeyData or NotifyHandle is NULL.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConInRegisterKeyNotify (\r
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,\r
OUT EFI_HANDLE *NotifyHandle\r
)\r
-/*++\r
-\r
- Routine Description:\r
- Register a notification function for a particular keystroke for the input device.\r
+;\r
\r
- Arguments:\r
- This - Protocol instance pointer.\r
- KeyData - A pointer to a buffer that is filled in with the keystroke\r
- information data for the key that was pressed.\r
- KeyNotificationFunction - Points to the function to be called when the key\r
- sequence is typed specified by KeyData.\r
- NotifyHandle - Points to the unique handle assigned to the registered notification.\r
+/**\r
+ Remove a registered notification function from a particular keystroke.\r
\r
- Returns:\r
- EFI_SUCCESS - The notification function was registered successfully.\r
- EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.\r
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.\r
+ @param This Protocol instance pointer.\r
+ @param NotificationHandle The handle of the notification function being\r
+ unregistered.\r
\r
---*/\r
-;\r
+ @retval EFI_SUCCESS The notification function was unregistered\r
+ successfully.\r
+ @retval EFI_INVALID_PARAMETER The NotificationHandle is invalid.\r
+ @retval EFI_NOT_FOUND Can not find the matching entry in database.\r
\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConInUnregisterKeyNotify (\r
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,\r
IN EFI_HANDLE NotificationHandle\r
)\r
-/*++\r
-\r
- Routine Description:\r
- Remove a registered notification function from a particular keystroke.\r
+;\r
\r
- Arguments:\r
- This - Protocol instance pointer.\r
- NotificationHandle - The handle of the notification function being unregistered.\r
+/**\r
+ Event notification function for EFI_SIMPLE_TEXT_INPUT_PROTOCOL.WaitForKey event\r
+ Signal the event if there is key available\r
\r
- Returns:\r
- EFI_SUCCESS - The notification function was unregistered successfully.\r
- EFI_INVALID_PARAMETER - The NotificationHandle is invalid.\r
- EFI_NOT_FOUND - Can not find the matching entry in database.\r
+ @param Event Indicates the event that invoke this function.\r
+ @param Context Indicates the calling context.\r
\r
---*/\r
-;\r
+ @return None\r
\r
+**/\r
VOID\r
EFIAPI\r
TerminalConInWaitForKey (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.Reset().\r
+ If ExtendeVerification is TRUE, then perform dependent serial device reset,\r
+ and set display mode to mode 0.\r
+ If ExtendedVerification is FALSE, only set display mode to mode 0.\r
+\r
+ @param This Indicates the calling context.\r
+ @param ExtendedVerification Indicates that the driver may perform a more\r
+ exhaustive verification operation of the device\r
+ during reset.\r
+\r
+ @return EFI_SUCCESS\r
+ @return The reset operation succeeds.\r
+ @return EFI_DEVICE_ERROR\r
+ @return The terminal is not functioning correctly or the serial port reset fails.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutReset (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.OutputString().\r
+ The Unicode string will be converted to terminal expressible data stream\r
+ and send to terminal via serial port.\r
+\r
+ @param This Indicates the calling context.\r
+ @param WString The Null-terminated Unicode string to be displayed\r
+ on the terminal screen.\r
+\r
+ @return EFI_SUCCESS The string is output successfully.\r
+ @return EFI_DEVICE_ERROR The serial port fails to send the string out.\r
+ @return EFI_WARN_UNKNOWN_GLYPH Indicates that some of the characters in the Unicode string could not\r
+ be rendered and are skipped.\r
+ @return EFI_UNSUPPORTED\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutOutputString (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.TestString().\r
+ If one of the characters in the *Wstring is\r
+ neither valid Unicode drawing characters,\r
+ not ASCII code, then this function will return\r
+ EFI_UNSUPPORTED.\r
+\r
+ @param This Indicates the calling context.\r
+ @param WString The Null-terminated Unicode string to be tested.\r
+\r
+ @return EFI_SUCCESS The terminal is capable of rendering the output string.\r
+ @return EFI_UNSUPPORTED Some of the characters in the Unicode string cannot be rendered.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutTestString (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.QueryMode().\r
+ It returns information for an available text mode\r
+ that the terminal supports.\r
+ In this driver, we support text mode 80x25 (mode 0),\r
+ 80x50 (mode 1), 100x31 (mode 2).\r
+\r
+ @param This Indicates the calling context.\r
+ @param ModeNumber The mode number to return information on.\r
+ @param Columns The returned columns of the requested mode.\r
+ @param Rows The returned rows of the requested mode.\r
+\r
+ @return EFI_SUCCESS The requested mode information is returned.\r
+ @return EFI_UNSUPPORTED The mode number is not valid.\r
+ @return EFI_DEVICE_ERROR\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutQueryMode (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUT.SetMode().\r
+ Set the terminal to a specified display mode.\r
+ In this driver, we only support mode 0.\r
+\r
+ @param This Indicates the calling context.\r
+ @param ModeNumber The text mode to set.\r
+\r
+ @return EFI_SUCCESS The requested text mode is set.\r
+ @return EFI_DEVICE_ERROR The requested text mode cannot be set \r
+ because of serial device error.\r
+ @return EFI_UNSUPPORTED The text mode number is not valid.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutSetMode (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetAttribute().\r
+\r
+ @param This Indicates the calling context.\r
+ @param Attribute The attribute to set. Only bit0..6 are valid, all other bits\r
+ are undefined and must be zero.\r
+\r
+ @return EFI_SUCCESS The requested attribute is set.\r
+ @return EFI_DEVICE_ERROR The requested attribute cannot be set due to serial port error.\r
+ @return EFI_UNSUPPORTED The attribute requested is not defined by EFI spec.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutSetAttribute (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.ClearScreen().\r
+ It clears the ANSI terminal's display to the\r
+ currently selected background color.\r
+\r
+ @param This Indicates the calling context.\r
+\r
+ @return EFI_SUCCESS The operation completed successfully.\r
+ @return EFI_DEVICE_ERROR The terminal screen cannot be cleared due to serial port error.\r
+ @return EFI_UNSUPPORTED The terminal is not in a valid display mode.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutClearScreen (\r
)\r
;\r
\r
+/**\r
+ Implements EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.SetCursorPosition().\r
+\r
+ @param This Indicates the calling context.\r
+ @param Column The row to set cursor to.\r
+ @param Row The column to set cursor to.\r
+\r
+ @return EFI_SUCCESS The operation completed successfully.\r
+ @return EFI_DEVICE_ERROR The request fails due to serial port error.\r
+ @return EFI_UNSUPPORTED The terminal is not in a valid text mode, or the cursor position\r
+ is invalid for current mode.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutSetCursorPosition (\r
)\r
;\r
\r
+/**\r
+ Implements SIMPLE_TEXT_OUTPUT.EnableCursor().\r
+ In this driver, the cursor cannot be hidden.\r
+\r
+ @param This Indicates the calling context.\r
+ @param Visible If TRUE, the cursor is set to be visible,\r
+ If FALSE, the cursor is set to be invisible.\r
+\r
+ @return EFI_SUCCESS The request is valid.\r
+ @return EFI_UNSUPPORTED The terminal does not support cursor hidden.\r
+\r
+**/\r
EFI_STATUS\r
EFIAPI\r
TerminalConOutEnableCursor (\r
//\r
// internal functions\r
//\r
+\r
+/**\r
+ Check for a pending key in the Efi Key FIFO or Serial device buffer.\r
+\r
+ @param This Indicates the calling context.\r
+\r
+ @return EFI_SUCCESS\r
+ @return There is key pending.\r
+ @return EFI_NOT_READY\r
+ @return There is no key pending.\r
+ @return EFI_DEVICE_ERROR\r
+\r
+**/\r
EFI_STATUS\r
TerminalConInCheckForKey (\r
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This\r
)\r
;\r
\r
+/**\r
+ Remove console device variable.\r
+\r
+ @param VariableName A pointer to the variable name.\r
+ @param ParentDevicePath A pointer to the parent device path.\r
+\r
+ @return None.\r
+\r
+**/\r
VOID\r
TerminalRemoveConsoleDevVariable (\r
IN CHAR16 *VariableName,\r
)\r
;\r
\r
+/**\r
+ Read the EFI variable (VendorGuid/Name) and return a dynamically allocated\r
+ buffer, and the size of the buffer. On failure return NULL.\r
+\r
+ @param Name String part of EFI variable name\r
+ @param VendorGuid GUID part of EFI variable name\r
+ @param VariableSize Returns the size of the EFI variable that was read\r
+\r
+ @return Dynamically allocated memory that contains a copy of the EFI variable.\r
+ @return Caller is repsoncible freeing the buffer.\r
+ @retval NULL Variable was not read\r
+\r
+**/\r
VOID *\r
TerminalGetVariableAndSize (\r
IN CHAR16 *Name,\r
)\r
;\r
\r
+/**\r
+ Get one key out of serial buffer.\r
+\r
+ @param SerialIo Serial I/O protocl attached to the serial device.\r
+ @param Input The fetched key.\r
+\r
+ @return EFI_NOT_READY If serial buffer is empty.\r
+ @return EFI_DEVICE_ERROR If reading serial buffer encounter error.\r
+ @return EFI_SUCCESS If reading serial buffer successfully, put\r
+ the fetched key to the parameter output.\r
+\r
+**/\r
EFI_STATUS\r
GetOneKeyFromSerial (\r
EFI_SERIAL_IO_PROTOCOL *SerialIo,\r
)\r
;\r
\r
+/**\r
+ Insert one byte raw data into the Raw Data FIFO.\r
+\r
+ @param TerminalDevice Terminal driver private structure.\r
+ @param Input The key will be input.\r
+\r
+ @return TRUE If insert successfully.\r
+ @return FLASE If Raw Data buffer is full before key insertion,\r
+ and the key is lost.\r
+\r
+**/\r
BOOLEAN\r
RawFiFoInsertOneKey (\r
TERMINAL_DEV *TerminalDevice,\r
)\r
;\r
\r
+/**\r
+ Remove one pre-fetched key out of the Raw Data FIFO.\r
+\r
+ @param TerminalDevice Terminal driver private structure.\r
+ @param Output The key will be removed.\r
+\r
+ @return TRUE If insert successfully.\r
+ @return FLASE If Raw Data FIFO buffer is empty before remove operation.\r
+\r
+**/\r
BOOLEAN\r
RawFiFoRemoveOneKey (\r
TERMINAL_DEV *TerminalDevice,\r
)\r
;\r
\r
+/**\r
+ Clarify whether Raw Data FIFO buffer is empty.\r
+\r
+ @param TerminalDevice Terminal driver private structure\r
+\r
+ @return TRUE If Raw Data FIFO buffer is empty.\r
+ @return FLASE If Raw Data FIFO buffer is not empty.\r
+\r
+**/\r
BOOLEAN\r
IsRawFiFoEmpty (\r
TERMINAL_DEV *TerminalDevice\r
)\r
;\r
\r
+/**\r
+ Clarify whether Raw Data FIFO buffer is full.\r
+\r
+ @param TerminalDevice Terminal driver private structure\r
+\r
+ @return TRUE If Raw Data FIFO buffer is full.\r
+ @return FLASE If Raw Data FIFO buffer is not full.\r
+\r
+**/\r
BOOLEAN\r
IsRawFiFoFull (\r
TERMINAL_DEV *TerminalDevice\r
)\r
;\r
\r
+/**\r
+ Insert one pre-fetched key into the FIFO buffer.\r
+\r
+ @param TerminalDevice Terminal driver private structure.\r
+ @param Key The key will be input.\r
+\r
+ @return TRUE If insert successfully.\r
+ @return FLASE If FIFO buffer is full before key insertion,\r
+ and the key is lost.\r
+\r
+**/\r
BOOLEAN\r
EfiKeyFiFoInsertOneKey (\r
TERMINAL_DEV *TerminalDevice,\r
)\r
;\r
\r
+/**\r
+ Remove one pre-fetched key out of the FIFO buffer.\r
+\r
+ @param TerminalDevice Terminal driver private structure.\r
+ @param Output The key will be removed.\r
+\r
+ @return TRUE If insert successfully.\r
+ @return FLASE If FIFO buffer is empty before remove operation.\r
+\r
+**/\r
BOOLEAN\r
EfiKeyFiFoRemoveOneKey (\r
TERMINAL_DEV *TerminalDevice,\r
)\r
;\r
\r
+/**\r
+ Clarify whether FIFO buffer is empty.\r
+\r
+ @param TerminalDevice Terminal driver private structure\r
+\r
+ @return TRUE If FIFO buffer is empty.\r
+ @return FLASE If FIFO buffer is not empty.\r
+\r
+**/\r
BOOLEAN\r
IsEfiKeyFiFoEmpty (\r
TERMINAL_DEV *TerminalDevice\r
)\r
;\r
\r
+/**\r
+ Clarify whether FIFO buffer is full.\r
+\r
+ @param TerminalDevice Terminal driver private structure\r
+\r
+ @return TRUE If FIFO buffer is full.\r
+ @return FLASE If FIFO buffer is not full.\r
+\r
+**/\r
BOOLEAN\r
IsEfiKeyFiFoFull (\r
TERMINAL_DEV *TerminalDevice\r
)\r
;\r
\r
+/**\r
+ Insert one pre-fetched key into the Unicode FIFO buffer.\r
+\r
+ @param TerminalDevice Terminal driver private structure.\r
+ @param Input The key will be input.\r
+\r
+ @return TRUE If insert successfully.\r
+ @return FLASE If Unicode FIFO buffer is full before key insertion,\r
+ and the key is lost.\r
+\r
+**/\r
BOOLEAN\r
UnicodeFiFoInsertOneKey (\r
TERMINAL_DEV *TerminalDevice,\r
)\r
;\r
\r
+/**\r
+ Remove one pre-fetched key out of the Unicode FIFO buffer.\r
+\r
+ @param TerminalDevice Terminal driver private structure.\r
+ @param Output The key will be removed.\r
+\r
+ @return TRUE If insert successfully.\r
+ @return FLASE If Unicode FIFO buffer is empty before remove operation.\r
+\r
+**/\r
BOOLEAN\r
UnicodeFiFoRemoveOneKey (\r
TERMINAL_DEV *TerminalDevice,\r
)\r
;\r
\r
+/**\r
+ Clarify whether Unicode FIFO buffer is empty.\r
+\r
+ @param TerminalDevice Terminal driver private structure\r
+\r
+ @return TRUE If Unicode FIFO buffer is empty.\r
+ @return FLASE If Unicode FIFO buffer is not empty.\r
+\r
+**/\r
BOOLEAN\r
IsUnicodeFiFoEmpty (\r
TERMINAL_DEV *TerminalDevice\r
)\r
;\r
\r
+/**\r
+ Clarify whether Unicode FIFO buffer is full.\r
+\r
+ @param TerminalDevice Terminal driver private structure\r
+\r
+ @return TRUE If Unicode FIFO buffer is full.\r
+ @return FLASE If Unicode FIFO buffer is not full.\r
+\r
+**/\r
BOOLEAN\r
IsUnicodeFiFoFull (\r
TERMINAL_DEV *TerminalDevice\r
)\r
;\r
\r
-//\r
-// internal functions for VT100\r
-//\r
-EFI_STATUS\r
-VT100TestString (\r
- IN TERMINAL_DEV *VT100Device,\r
- IN CHAR16 *WString\r
- )\r
-;\r
-\r
-//\r
-// internal functions for VT100Plus\r
-//\r
-EFI_STATUS\r
-VT100PlusTestString (\r
- IN TERMINAL_DEV *TerminalDevice,\r
- IN CHAR16 *WString\r
- )\r
-;\r
-\r
//\r
// internal functions for VTUTF8\r
//\r