TianoCore EDK2 master
|
#include "Ps2Keyboard.h"
Go to the source code of this file.
Routines implements SIMPLE_TEXT_IN protocol's interfaces based on 8042 interfaces provided by Ps2KbdCtrller.c.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
SPDX-License-Identifier: BSD-2-Clause-Patent
Definition in file Ps2KbdTextIn.c.
BOOLEAN IsEfikeyBufEmpty | ( | IN EFI_KEY_QUEUE * | Queue | ) |
Check whether the EFI key buffer is empty.
Queue | Pointer to instance of EFI_KEY_QUEUE. |
TRUE | The EFI key buffer is empty. |
FALSE | The EFI key buffer isn't empty. |
Definition at line 21 of file Ps2KbdTextIn.c.
BOOLEAN IsKeyRegistered | ( | IN EFI_KEY_DATA * | RegsiteredData, |
IN EFI_KEY_DATA * | InputData | ||
) |
Judge whether is a registered key
RegsiteredData | A pointer to a buffer that is filled in with the keystroke state data for the key that was registered. |
InputData | A pointer to a buffer that is filled in with the keystroke state data for the key that was pressed. |
TRUE | Key be pressed matches a registered key. |
FALSE | Match failed. |
Definition at line 94 of file Ps2KbdTextIn.c.
EFI_STATUS EFIAPI KeyboardEfiReset | ( | IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Perform 8042 controller and keyboard initialization which implement SIMPLE_TEXT_IN.Reset()
This | Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL |
ExtendedVerification | Indicate that the driver may perform a more exhaustive verification operation of the device during reset, now this par is ignored in this driver |
Definition at line 188 of file Ps2KbdTextIn.c.
EFI_STATUS EFIAPI KeyboardEfiResetEx | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | This, |
IN BOOLEAN | ExtendedVerification | ||
) |
Reset the input device and optionally run diagnostics
This | Protocol instance pointer. |
ExtendedVerification | Driver may perform diagnostics on reset. |
EFI_SUCCESS | The device was reset. |
EFI_DEVICE_ERROR | The device is not functioning properly and could not be reset. |
Definition at line 407 of file Ps2KbdTextIn.c.
EFI_STATUS EFIAPI KeyboardReadKeyStroke | ( | IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL * | This, |
OUT EFI_INPUT_KEY * | Key | ||
) |
Retrieve key values for driver user which implement SIMPLE_TEXT_IN.ReadKeyStroke().
This | Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL |
Key | The output buffer for key value |
EFI_SUCCESS | success to read key stroke |
EFI_UNSUPPORTED | The device does not support the ability to read keystroke data. |
Definition at line 266 of file Ps2KbdTextIn.c.
EFI_STATUS EFIAPI KeyboardReadKeyStrokeEx | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | This, |
OUT EFI_KEY_DATA * | KeyData | ||
) |
Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existence of a keystroke via WaitForEvent () call.
This | Protocol instance pointer. |
KeyData | A pointer to a buffer that is filled in with the keystroke state data for the key that was pressed. |
EFI_SUCCESS | The keystroke information was returned. |
EFI_NOT_READY | There was no keystroke data available. |
EFI_DEVICE_ERROR | The keystroke information was not returned due to hardware errors. |
EFI_INVALID_PARAMETER | KeyData is NULL. |
EFI_UNSUPPORTED | The device does not support the ability to read keystroke data. |
Definition at line 442 of file Ps2KbdTextIn.c.
EFI_STATUS KeyboardReadKeyStrokeWorker | ( | IN KEYBOARD_CONSOLE_IN_DEV * | ConsoleInDev, |
OUT EFI_KEY_DATA * | KeyData | ||
) |
Reads the next keystroke from the input device. The WaitForKey Event can be used to test for existence of a keystroke via WaitForEvent () call.
ConsoleInDev | Ps2 Keyboard private structure |
KeyData | A pointer to a buffer that is filled in with the keystroke state data for the key that was pressed. |
EFI_SUCCESS | The keystroke information was returned. |
EFI_NOT_READY | There was no keystroke data available. |
EFI_DEVICE_ERROR | The keystroke information was not returned due to hardware errors. |
EFI_INVALID_PARAMETER | KeyData is NULL. |
Definition at line 143 of file Ps2KbdTextIn.c.
EFI_STATUS EFIAPI KeyboardRegisterKeyNotify | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | This, |
IN EFI_KEY_DATA * | KeyData, | ||
IN EFI_KEY_NOTIFY_FUNCTION | KeyNotificationFunction, | ||
OUT VOID ** | NotifyHandle | ||
) |
Register a notification function for a particular keystroke for the input device.
This | Protocol instance pointer. |
KeyData | A pointer to a buffer that is filled in with the keystroke information data for the key that was pressed. If KeyData.Key, KeyData.KeyState.KeyToggleState and KeyData.KeyState.KeyShiftState are 0, then any incomplete keystroke will trigger a notification of the KeyNotificationFunction. |
KeyNotificationFunction | Points to the function to be called when the key sequence is typed specified by KeyData. This notification function should be called at <=TPL_CALLBACK. |
NotifyHandle | Points to the unique handle assigned to the registered notification. |
EFI_SUCCESS | The notification function was registered successfully. |
EFI_OUT_OF_RESOURCES | Unable to allocate resources for necessary data structures. |
EFI_INVALID_PARAMETER | KeyData or NotifyHandle or KeyNotificationFunction is NULL. |
Definition at line 563 of file Ps2KbdTextIn.c.
EFI_STATUS EFIAPI KeyboardSetState | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | This, |
IN EFI_KEY_TOGGLE_STATE * | KeyToggleState | ||
) |
Set certain state for the input device.
This | Protocol instance pointer. |
KeyToggleState | A pointer to the EFI_KEY_TOGGLE_STATE to set the state for the input device. |
EFI_SUCCESS | The device state was set successfully. |
EFI_DEVICE_ERROR | The device is not functioning correctly and could not have the setting adjusted. |
EFI_UNSUPPORTED | The device does not have the ability to set its state. |
EFI_INVALID_PARAMETER | KeyToggleState is NULL. |
Definition at line 474 of file Ps2KbdTextIn.c.
EFI_STATUS EFIAPI KeyboardUnregisterKeyNotify | ( | IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL * | This, |
IN VOID * | NotificationHandle | ||
) |
Remove a registered notification function from a particular keystroke.
This | Protocol instance pointer. |
NotificationHandle | The handle of the notification function being unregistered. |
EFI_SUCCESS | The notification function was unregistered successfully. |
EFI_INVALID_PARAMETER | The NotificationHandle is invalid. |
Definition at line 645 of file Ps2KbdTextIn.c.
Event notification function for SIMPLE_TEXT_IN.WaitForKey event Signal the event if there is key available
Event | the event object |
Context | waiting context |
Definition at line 325 of file Ps2KbdTextIn.c.
Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event Signal the event if there is key available
Event | event object |
Context | waiting context |
Definition at line 385 of file Ps2KbdTextIn.c.
Process key notify.
Event | Indicates the event that invoke this function. |
Context | Indicates the calling context. |
Definition at line 706 of file Ps2KbdTextIn.c.
EFI_STATUS PopEfikeyBufHead | ( | IN EFI_KEY_QUEUE * | Queue, |
OUT EFI_KEY_DATA *KeyData | OPTIONAL | ||
) |
Read & remove one key data from the EFI key buffer.
Queue | Pointer to instance of EFI_KEY_QUEUE. |
KeyData | Receive the key data. |
EFI_SUCCESS | The key data is popped successfully. |
EFI_NOT_READY | There is no key data available. |
Definition at line 38 of file Ps2KbdTextIn.c.
VOID PushEfikeyBufTail | ( | IN EFI_KEY_QUEUE * | Queue, |
IN EFI_KEY_DATA * | KeyData | ||
) |
Push one key data to the EFI key buffer.
Queue | Pointer to instance of EFI_KEY_QUEUE. |
KeyData | The key data to push. |
Definition at line 65 of file Ps2KbdTextIn.c.