/** @file\r
- Simple Console that sits on a SerialLib. \r
+ Simple Console that sits on a SerialLib.\r
\r
Copyright (c) 2008 - 2009, Apple Inc. All rights reserved.<BR>\r
- \r
- This program and the accompanying materials\r
- are licensed and made available under the terms and conditions of the BSD License\r
- which accompanies this distribution. The full text of the license may be found at\r
- http://opensource.org/licenses/bsd-license.php\r
\r
- THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
- WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+ SPDX-License-Identifier: BSD-2-Clause-Patent\r
\r
**/\r
\r
-/* \r
+/*\r
Symbols used in table below\r
===========================\r
ESC = 0x1B\r
)\r
{\r
CHAR8 Char;\r
- \r
+\r
if (!SerialPortPoll ()) {\r
return EFI_NOT_READY;\r
}\r
- \r
+\r
SerialPortRead ((UINT8 *)&Char, 1);\r
- \r
+\r
//\r
- // Check for ESC sequence. This code is not techincally correct VT100 code.\r
+ // Check for ESC sequence. This code is not technically correct VT100 code.\r
// An illegal ESC sequence represents an ESC and the characters that follow.\r
- // This code will eat one or two chars after an escape. This is done to \r
+ // This code will eat one or two chars after an escape. This is done to\r
// prevent some complex FIFOing of the data. It is good enough to get\r
// the arrow and delete keys working\r
//\r
Key->ScanCode = SCAN_HOME;\r
break;\r
case 'K':\r
- case 'F': // PC ANSI \r
+ case 'F': // PC ANSI\r
Key->ScanCode = SCAN_END;\r
break;\r
case '@':\r
Key->ScanCode = SCAN_INSERT;\r
break;\r
case 'P':\r
- case 'X': // PC ANSI \r
+ case 'X': // PC ANSI\r
Key->ScanCode = SCAN_DELETE;\r
break;\r
case 'U':\r
}\r
}\r
} else if (Char < ' ') {\r
- if ((Char == CHAR_BACKSPACE) || \r
- (Char == CHAR_TAB) || \r
- (Char == CHAR_LINEFEED) || \r
+ if ((Char == CHAR_BACKSPACE) ||\r
+ (Char == CHAR_TAB) ||\r
+ (Char == CHAR_LINEFEED) ||\r
(Char == CHAR_CARRIAGE_RETURN)) {\r
// Only let through EFI required control characters\r
- Key->UnicodeChar = (CHAR16)Char; \r
+ Key->UnicodeChar = (CHAR16)Char;\r
}\r
} else if (Char == 0x7f) {\r
Key->ScanCode = SCAN_DELETE;\r
EFI_SIMPLE_TEXT_OUTPUT_MODE *Mode;\r
UINTN MaxColumn;\r
UINTN MaxRow;\r
- \r
+\r
Size = StrLen(String) + 1;\r
OutputString = AllocatePool(Size);\r
\r
//If there is any non-ascii characters in String buffer then replace it with '?'\r
//Eventually, UnicodeStrToAsciiStr API should be fixed.\r
- SafeUnicodeStrToAsciiStr(String, OutputString); \r
+ SafeUnicodeStrToAsciiStr(String, OutputString);\r
SerialPortWrite ((UINT8 *)OutputString, Size - 1);\r
\r
//\r
This,\r
Mode->Mode,\r
&MaxColumn,\r
- &MaxRow \r
+ &MaxRow\r
);\r
if (EFI_ERROR(Status)) {\r
return EFI_UNSUPPORTED;\r
&mSimpleTextIn.WaitForKey\r
);\r
ASSERT_EFI_ERROR (Status);\r
- \r
+\r
Status = gBS->InstallMultipleProtocolInterfaces(\r
&mInstallHandle,\r
&gEfiSimpleTextInProtocolGuid, &mSimpleTextIn,\r
gST->ConOut = &mSimpleTextOut;\r
gST->ConIn = &mSimpleTextIn;\r
}\r
- \r
+\r
return Status;\r
}\r