(C) Copyright 2014 Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.<BR>\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
while (TRUE) {\r
//\r
// Enter critical section\r
- // \r
+ //\r
OldTpl = gBS->RaiseTPL (TPL_NOTIFY);\r
HasKey = EfiKeyFiFoForNotifyRemoveOneKey (TerminalDevice->EfiKeyFiFoForNotify, &Key);\r
CopyMem (&KeyData.Key, &Key, sizeof (EFI_INPUT_KEY));\r
//\r
EfiKeyFiFoForNotifyInsertOneKey (TerminalDevice->EfiKeyFiFoForNotify, Key);\r
gBS->SignalEvent (TerminalDevice->KeyNotifyProcessEvent);\r
+ break;\r
}\r
}\r
if (IsEfiKeyFiFoFull (TerminalDevice)) {\r
\r
/**\r
Remove one pre-fetched key out of the Unicode FIFO buffer.\r
- The caller should guarantee that Unicode FIFO buffer is not empty \r
+ The caller should guarantee that Unicode FIFO buffer is not empty\r
by IsUnicodeFiFoEmpty ().\r
\r
@param TerminalDevice Terminal driver private structure.\r
return FALSE;\r
}\r
\r
-/**\r
- Count Unicode FIFO buffer.\r
-\r
- @param TerminalDevice Terminal driver private structure\r
-\r
- @return The count in bytes of Unicode FIFO.\r
-\r
-**/\r
-UINT8\r
-UnicodeFiFoGetKeyCount (\r
- TERMINAL_DEV *TerminalDevice\r
- )\r
-{\r
- UINT8 Tail;\r
- UINT8 Head;\r
-\r
- Tail = TerminalDevice->UnicodeFiFo->Tail;\r
- Head = TerminalDevice->UnicodeFiFo->Head;\r
-\r
- if (Tail >= Head) {\r
- return (UINT8) (Tail - Head);\r
- } else {\r
- return (UINT8) (Tail + FIFO_MAX_NUMBER + 1 - Head);\r
- }\r
-}\r
\r
/**\r
Update the Unicode characters from a terminal input device into EFI Keys FIFO.\r
There is one special input sequence that will force the system to reset.\r
This is ESC R ESC r ESC R.\r
\r
- Note: current implementation support terminal types include: PC ANSI, VT100+/VTUTF8, VT100. \r
+ Note: current implementation support terminal types include: PC ANSI, VT100+/VTUTF8, VT100.\r
The table below is not same with UEFI Spec 2.3 Appendix B Table 201(not support ANSI X3.64 /\r
DEC VT200-500 and extra support PC ANSI, VT100)since UEFI Table 201 is just an example.\r
- \r
+\r
Symbols used in table below\r
===========================\r
ESC = 0x1B\r