summaryrefslogtreecommitdiff
path: root/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe
diff options
context:
space:
mode:
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-14 03:12:57 +0000
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>2008-04-14 03:12:57 +0000
commitbcd70414877e56f3bffff0bf11b07a30ef51a68f (patch)
treef85543ec5a77ffd11383071acd5d68305a2cfc83 /IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe
parente1a09a0eaa2de7bb9cd41c98e2f5fa383fb7a401 (diff)
downloadedk2-platforms-bcd70414877e56f3bffff0bf11b07a30ef51a68f.tar.xz
Coding style modification.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5058 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe')
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c417
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c352
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c94
-rw-r--r--IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h413
4 files changed, 499 insertions, 777 deletions
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
index 26e40d6bea..6ca9ece4c1 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdCtrller.c
@@ -635,26 +635,20 @@ ConvertKeyboardScanCodeToEfiKey[] = {
//
STATIC UINTN mWaitForValueTimeOut = KEYBOARD_WAITFORVALUE_TIMEOUT;
+/**
+ Read data register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return return the value
+
+**/
STATIC
UINT8
KeyReadDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
UINT8 Data;
@@ -675,28 +669,20 @@ Returns:
return Data;
}
+/**
+ Write data register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data value wanted to be written
+
+**/
STATIC
VOID
KeyWriteDataRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -718,25 +704,18 @@ Returns:
//
}
+/**
+ Read status register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return value in status register
+
+**/
UINT8
KeyReadStatusRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
UINT8 Data;
@@ -758,28 +737,20 @@ Returns:
}
+/**
+ Write command register
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data The value wanted to be written
+
+**/
+
STATIC
VOID
KeyWriteCommandRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
{
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -798,25 +769,19 @@ Returns:
}
+/**
+ Display error message
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param ErrMsg Unicode string of error message
+
+**/
STATIC
VOID
KeyboardError (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN CHAR16 *ErrMsg
)
-/*++
-
-Routine Description:
-
- Display error message
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
-// GC_TODO: ErrMsg - add argument and description to function comment
{
ConsoleIn->KeyboardErr = TRUE;
@@ -826,30 +791,24 @@ Returns:
//
}
-VOID
-EFIAPI
-KeyboardTimerHandler (
- IN EFI_EVENT Event,
- IN VOID *Context
- )
-/*++
-
-Routine Description:
-
+/**
Timer event handler: read a series of scancodes from 8042
and put them into memory scancode buffer.
it read as much scancodes to either fill
the memory buffer or empty the keyboard buffer.
It is registered as running under TPL_NOTIFY
-Arguments:
-
- Event - The timer event
- Context - A KEYBOARD_CONSOLE_IN_DEV pointer
+ @param Event - The timer event
+ @param Context - A KEYBOARD_CONSOLE_IN_DEV pointer
-Returns:
+**/
+VOID
+EFIAPI
+KeyboardTimerHandler (
+ IN EFI_EVENT Event,
+ IN VOID *Context
+ )
---*/
{
UINT8 Data;
EFI_TPL OldTpl;
@@ -942,6 +901,17 @@ Returns:
return ;
}
+/**
+ Read several bytes from the scancode buffer without removing them.
+ This function is called to see if there are enough bytes of scancode
+ representing a single key.
+
+ @param Count - Number of bytes to be read
+ @param Buf - Store the results
+
+ @retval EFI_SUCCESS success to scan the keyboard code
+ @retval EFI_NOT_READY invalid parameter
+**/
STATIC
EFI_STATUS
GetScancodeBufHead (
@@ -949,27 +919,6 @@ GetScancodeBufHead (
IN UINT32 Count,
OUT UINT8 *Buf
)
-/*++
-
-Routine Description:
-
- Read several bytes from the scancode buffer without removing them.
- This function is called to see if there are enough bytes of scancode
- representing a single key.
-
-Arguments:
-
- Count - Number of bytes to be read
- Buf - Store the results
-
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
-// GC_TODO: EFI_NOT_READY - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
UINT32 Index;
UINT32 Pos;
@@ -1005,6 +954,17 @@ Returns:
return EFI_SUCCESS;
}
+/**
+
+ Read & remove several bytes from the scancode buffer.
+ This function is usually called after GetScancodeBufHead()
+
+ @param Count - Number of bytes to be read
+ @param Buf - Store the results
+
+ @retval EFI_SUCCESS success to scan the keyboard code
+ @retval EFI_NOT_READY invalid parameter
+**/
STATIC
EFI_STATUS
PopScancodeBufHead (
@@ -1012,26 +972,6 @@ PopScancodeBufHead (
IN UINT32 Count,
OUT UINT8 *Buf
)
-/*++
-
-Routine Description:
-
- Read & remove several bytes from the scancode buffer.
- This function is usually called after GetScancodeBufHead()
-
-Arguments:
-
- Count - Number of bytes to be read
- Buf - Store the results
-
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
-// GC_TODO: EFI_NOT_READY - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
UINT32 Index;
@@ -1068,28 +1008,22 @@ Returns:
return EFI_SUCCESS;
}
+/**
+ Read key value
+
+ @param ConsoleIn - Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data - Pointer to outof buffer for keeping key value
+
+ @retval EFI_TIMEOUT Status resigter time out
+ @retval EFI_SUCCESS Success to read keyboard
+
+**/
EFI_STATUS
KeyboardRead (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
OUT UINT8 *Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINT32 TimeOut;
UINT32 RegFilled;
@@ -1117,29 +1051,22 @@ Returns:
return EFI_SUCCESS;
}
+/**
+ write key to keyboard
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data value wanted to be written
+
+ @retval EFI_TIMEOUT - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+
+**/
STATIC
EFI_STATUS
KeyboardWrite (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINT32 TimeOut;
UINT32 RegEmptied;
@@ -1170,30 +1097,22 @@ Returns:
return EFI_SUCCESS;
}
+/**
+ Issue keyboard command
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data The buff holding the command
+
+ @retval EFI_TIMEOUT Keyboard is not ready to issuing
+ @retval EFI_SUCCESS Success to issue keyboard command
+
+**/
STATIC
EFI_STATUS
KeyboardCommand (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
-
-Returns:
-
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_TIMEOUT - GC_TODO: Add description for return value
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
UINT32 TimeOut;
UINT32 RegEmptied;
@@ -1241,32 +1160,24 @@ Returns:
return EFI_SUCCESS;
}
+/**
+ wait for a specific value to be presented on
+ 8042 Data register by keyboard and then read it,
+ used in keyboard commands ack
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Value the value wanted to be waited.
+
+ @retval EFI_TIMEOUT Fail to get specific value in given time
+ @retval EFI_SUCCESS Success to get specific value in given time.
+
+**/
STATIC
EFI_STATUS
KeyboardWaitForValue (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN UINT8 Value
)
-/*++
-
-Routine Description:
-
- wait for a specific value to be presented on
- 8042 Data register by keyboard and then read it,
- used in keyboard commands ack
-
-Arguments:
-
- ConsoleIn - The KEYBOARD_CONSOLE_IN_DEV instance pointer
- Value - The value to be waited for
-
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: EFI_SUCCESS - add return value to function comment
-// GC_TODO: EFI_TIMEOUT - add return value to function comment
{
UINT8 Data;
UINT32 TimeOut;
@@ -1324,23 +1235,19 @@ Returns:
}
-EFI_STATUS
-UpdateStatusLights (
- IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
- )
-/*++
-
-Routine Description:
-
+/**
Show keyboard status lights according to
indicators in ConsoleIn.
-Arguments:
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return status
-Returns:
-
---*/
-// GC_TODO: ConsoleIn - add argument and description to function comment
+**/
+EFI_STATUS
+UpdateStatusLights (
+ IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
+ )
{
EFI_STATUS Status;
UINT8 Command;
@@ -1381,28 +1288,21 @@ Returns:
return Status;
}
-EFI_STATUS
-KeyGetchar (
- IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
- )
-/*++
-
-Routine Description:
-
+/**
Get scancode from scancode buffer
and translate into EFI-scancode and unicode defined by EFI spec
The function is always called in TPL_NOTIFY
-Arguments:
-
- ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
+ @param ConsoleIn KEYBOARD_CONSOLE_IN_DEV instance pointer
-Returns:
+ @retval EFI_NOT_READY - Input from console not ready yet.
+ @retval EFI_SUCCESS - Function executed successfully.
- EFI_NOT_READY - Input from console not ready yet.
- EFI_SUCCESS - Function executed successfully.
-
---*/
+**/
+EFI_STATUS
+KeyGetchar (
+ IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
+ )
{
EFI_STATUS Status;
UINT8 ScanCode;
@@ -1740,32 +1640,22 @@ Returns:
return EFI_SUCCESS;
}
-EFI_STATUS
-InitKeyboard (
- IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
- IN BOOLEAN ExtendedVerification
- )
-/*++
-
-Routine Description:
-
+/**
Perform 8042 controller and keyboard Initialization
If ExtendedVerification is TRUE, do additional test for
the keyboard interface
-Arguments:
-
- ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
- ExtendedVerification - indicates a thorough initialization
+ @param ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
+ @param ExtendedVerification - indicates a thorough initialization
-Returns:
-
- EFI_STATUS
-
---*/
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
+ @retval EFI_DEVICE_ERROR Fail to init keyboard
+ @retval EFI_SUCCESS Success to init keyboard
+**/
+EFI_STATUS
+InitKeyboard (
+ IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
+ IN BOOLEAN ExtendedVerification
+ )
{
EFI_STATUS Status;
EFI_STATUS Status1;
@@ -2086,26 +1976,18 @@ Done:
}
-EFI_STATUS
-DisableKeyboard (
- IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
- )
-/*++
-
-Routine Description:
-
+/**
Disable the keyboard interface of the 8042 controller
-Arguments:
-
- ConsoleIn - the device instance
-
-Returns:
+ @param ConsoleIn - the device instance
- EFI_STATUS
+ @return status of issuing disable command
---*/
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
+**/
+EFI_STATUS
+DisableKeyboard (
+ IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
+ )
{
EFI_STATUS Status;
@@ -2170,3 +2052,4 @@ CheckKeyboardConnect (
return TRUE;
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
index 71cf8eed03..17bbcc3136 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c
@@ -45,54 +45,48 @@ KeyboardCheckForKey (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This
);
+/**
+ @param RegsiteredData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was registered.
+ @param InputData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
+
+ @retval TRUE - Key be pressed matches a registered key.
+ @retval FALSE - Match failed.
+
+**/
STATIC
BOOLEAN
IsKeyRegistered (
IN EFI_KEY_DATA *RegsiteredData,
IN EFI_KEY_DATA *InputData
)
-/*++
-
-Routine Description:
+;
-Arguments:
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
- 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.
+
+ @param ConsoleInDev - Ps2 Keyboard private structure
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
-Returns:
- TRUE - Key be pressed matches a registered key.
- FLASE - Match failed.
---*/
-;
+ @retval EFI_SUCCESS - The keystroke information was returned.
+ @retval EFI_NOT_READY - There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ hardware errors.
+ @retval EFI_INVALID_PARAMETER - KeyData is NULL.
+
+**/
STATIC
EFI_STATUS
KeyboardReadKeyStrokeWorker (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev,
OUT EFI_KEY_DATA *KeyData
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
-
- Arguments:
- 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.
-
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
- hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
---*/
{
EFI_STATUS Status;
EFI_TPL OldTpl;
@@ -161,29 +155,23 @@ KeyboardReadKeyStrokeWorker (
return EFI_SUCCESS;
}
+/**
+ logic reset keyboard
+ Implement SIMPLE_TEXT_IN.Reset()
+ Perform 8042 controller and keyboard initialization
+
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param 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
+
+**/
EFI_STATUS
EFIAPI
KeyboardEfiReset (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- Implement SIMPLE_TEXT_IN.Reset()
- Perform 8042 controller and keyboard initialization
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: ExtendedVerification - add argument and description to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -251,29 +239,21 @@ Returns:
return EFI_SUCCESS;
}
+/**
+ Implement SIMPLE_TEXT_IN.ReadKeyStroke().
+ Retrieve key values for driver user.
+
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param Key The output buffer for key value
+
+ @retval EFI_SUCCESS success to read key stroke
+**/
EFI_STATUS
EFIAPI
KeyboardReadKeyStroke (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
OUT EFI_INPUT_KEY *Key
)
-/*++
-
-Routine Description:
-
- Implement SIMPLE_TEXT_IN.ReadKeyStroke().
- Retrieve key values for driver user.
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Key - add argument and description to function comment
-// GC_TODO: EFI_DEVICE_ERROR - add return value to function comment
-// GC_TODO: EFI_NOT_READY - add return value to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -290,26 +270,20 @@ Returns:
}
+/**
+ Event notification function for SIMPLE_TEXT_IN.WaitForKey event
+ Signal the event if there is key available
+
+ @param Event the event object
+ @param Context waitting context
+
+**/
VOID
EFIAPI
KeyboardWaitForKey (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- Event notification function for SIMPLE_TEXT_IN.WaitForKey event
- Signal the event if there is key available
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: Event - add argument and description to function comment
-// GC_TODO: Context - add argument and description to function comment
{
EFI_TPL OldTpl;
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -343,25 +317,17 @@ Returns:
return ;
}
+/**
+ Check keyboard for given key value
+
+ @param This Point to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+
+ @retval EFI_SUCCESS success check keyboard value
+**/
EFI_STATUS
KeyboardCheckForKey (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
-
-Returns:
-
- EFI_SUCCESS - GC_TODO: Add description for return value
-
---*/
{
KEYBOARD_CONSOLE_IN_DEV *ConsoleIn;
@@ -377,28 +343,25 @@ Returns:
return EFI_SUCCESS;
}
+/**
+ Judge whether is a registed key
+
+ @param RegsiteredData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was registered.
+ @param InputData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
+
+ @retval TRUE - Key be pressed matches a registered key.
+ @retval FLASE - Match failed.
+
+**/
STATIC
BOOLEAN
IsKeyRegistered (
IN EFI_KEY_DATA *RegsiteredData,
IN EFI_KEY_DATA *InputData
)
-/*++
-
-Routine Description:
-
-Arguments:
-
- 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.
-Returns:
- TRUE - Key be pressed matches a registered key.
- FLASE - Match failed.
-
---*/
{
ASSERT (RegsiteredData != NULL && InputData != NULL);
@@ -423,24 +386,21 @@ Returns:
}
+/**
+ Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
+ Signal the event if there is key available
+
+ @param Event event object
+ @param Context waiting context
+
+**/
VOID
EFIAPI
KeyboardWaitForKeyEx (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
- Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
- Signal the event if there is key available
-
-Arguments:
-
-Returns:
-
---*/
{
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -449,27 +409,24 @@ Returns:
}
+/**
+ Reset the input device and optionaly run diagnostics
+
+ @param This - Protocol instance pointer.
+ @param ExtendedVerification - Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS - The device was reset.
+ @retval EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+**/
EFI_STATUS
EFIAPI
KeyboardEfiResetEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
- Routine Description:
- Reset the input device and optionaly run diagnostics
-
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -498,31 +455,29 @@ KeyboardEfiResetEx (
return EFI_SUCCESS;
}
-EFI_STATUS
-EFIAPI
-KeyboardReadKeyStrokeEx (
- IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
- OUT EFI_KEY_DATA *KeyData
- )
-/*++
-
- Routine Description:
+/**
Reads the next keystroke from the input device. The WaitForKey Event can
be used to test for existance of a keystroke via WaitForEvent () call.
- Arguments:
- This - Protocol instance pointer.
- KeyData - A pointer to a buffer that is filled in with the keystroke
+
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
state data for the key that was pressed.
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ @retval EFI_SUCCESS - The keystroke information was returned.
+ @retval EFI_NOT_READY - There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to
hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
+ @retval EFI_INVALID_PARAMETER - KeyData is NULL.
+
+**/
+EFI_STATUS
+EFIAPI
+KeyboardReadKeyStrokeEx (
+ IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
+ OUT EFI_KEY_DATA *KeyData
+ )
---*/
{
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -535,30 +490,27 @@ KeyboardReadKeyStrokeEx (
}
+/**
+ Set certain state for the input device.
+
+ @param This - Protocol instance pointer.
+ @param KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ state for the input device.
+
+ @retval EFI_SUCCESS - The device state was set successfully.
+ @retval EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not have the setting adjusted.
+ @retval EFI_UNSUPPORTED - The device does not have the ability to set its state.
+ @retval EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+
+**/
EFI_STATUS
EFIAPI
KeyboardSetState (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
)
-/*++
- Routine Description:
- Set certain state for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
- state for the input device.
-
- Returns:
- 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.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -619,6 +571,22 @@ Exit:
return Status;
}
+
+/**
+ Register a notification function for a particular keystroke for the input device.
+
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ information data for the key that was pressed.
+ @param KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ @param NotifyHandle - Points to the unique handle assigned to the registered notification.
+
+ @retval EFI_SUCCESS - The notification function was registered successfully.
+ @retval EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
+ @retval EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+**/
EFI_STATUS
EFIAPI
KeyboardRegisterKeyNotify (
@@ -627,25 +595,6 @@ KeyboardRegisterKeyNotify (
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
)
-/*++
-
- Routine Description:
- Register a notification function for a particular keystroke for the input device.
-
- Arguments:
- 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.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
-
- Returns:
- EFI_SUCCESS - The notification function was registered successfully.
- EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
@@ -720,27 +669,24 @@ Exit:
}
+/**
+ Remove a registered notification function from a particular keystroke.
+
+ @param This - Protocol instance pointer.
+ @param NotificationHandle - The handle of the notification function being unregistered.
+
+
+ @retval EFI_SUCCESS - The notification function was unregistered successfully.
+ @retval EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
+ @retval EFI_NOT_FOUND - Can not find the matching entry in database.
+
+**/
EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
)
-/*++
-
- Routine Description:
- Remove a registered notification function from a particular keystroke.
-
- Arguments:
- This - Protocol instance pointer.
- NotificationHandle - The handle of the notification function being unregistered.
-
- Returns:
- EFI_SUCCESS - The notification function was unregistered successfully.
- EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
{
EFI_STATUS Status;
KEYBOARD_CONSOLE_IN_DEV *ConsoleInDev;
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c
index 359d031ad2..0d4a87db91 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.c
@@ -62,6 +62,16 @@ EFI_DRIVER_BINDING_PROTOCOL gKeyboardControllerDriver = {
NULL
};
+/**
+ Test controller is a keyboard Controller
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver's controller
+ @param RemainingDevicePath children device path
+
+ @retval EFI_UNSUPPORTED controller is not floppy disk
+ @retval EFI_SUCCESS controller is floppy disk
+**/
EFI_STATUS
EFIAPI
KbdControllerDriverSupported (
@@ -69,20 +79,6 @@ KbdControllerDriverSupported (
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
- ControllerDriver Protocol Method
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: RemainingDevicePath - add argument and description to function comment
{
EFI_STATUS Status;
EFI_ISA_IO_PROTOCOL *IsaIo;
@@ -120,6 +116,15 @@ Returns:
return Status;
}
+/**
+ Create KEYBOARD_CONSOLE_IN_DEV instance on controller.
+
+ @param This Pointer of EFI_DRIVER_BINDING_PROTOCOL
+ @param Controller driver controller handle
+ @param RemainingDevicePath Children's device path
+
+ @retval whether success to create floppy control instance.
+**/
EFI_STATUS
EFIAPI
KbdControllerDriverStart (
@@ -127,19 +132,6 @@ KbdControllerDriverStart (
IN EFI_HANDLE Controller,
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
)
-/*++
-
-Routine Description:
-
-Arguments:
-
-Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: RemainingDevicePath - add argument and description to function comment
-// GC_TODO: EFI_INVALID_PARAMETER - add return value to function comment
{
EFI_STATUS Status;
EFI_STATUS Status1;
@@ -388,6 +380,20 @@ ErrorExit:
return Status;
}
+/**
+ Stop this driver on ControllerHandle. Support stoping any child handles
+ created by this driver.
+
+ @param This Protocol instance pointer.
+ @param ControllerHandle Handle of device to stop driver on
+ @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of
+ children is zero stop the entire bus driver.
+ @param ChildHandleBuffer List of Child Handles to Stop.
+
+ @retval EFI_SUCCESS This driver is removed ControllerHandle
+ @retval other This driver was not removed from this device
+
+**/
EFI_STATUS
EFIAPI
KbdControllerDriverStop (
@@ -396,20 +402,6 @@ KbdControllerDriverStop (
IN UINTN NumberOfChildren,
IN EFI_HANDLE *ChildHandleBuffer
)
-/*++
-
- Routine Description:
-
- Arguments:
-
- Returns:
-
---*/
-// GC_TODO: This - add argument and description to function comment
-// GC_TODO: Controller - add argument and description to function comment
-// GC_TODO: NumberOfChildren - add argument and description to function comment
-// GC_TODO: ChildHandleBuffer - add argument and description to function comment
-// GC_TODO: EFI_SUCCESS - add return value to function comment
{
EFI_STATUS Status;
EFI_SIMPLE_TEXT_INPUT_PROTOCOL *ConIn;
@@ -517,25 +509,16 @@ KbdControllerDriverStop (
return EFI_SUCCESS;
}
+/**
+ Free the waiting key notify list.
+
+ @param ListHead Pointer to list head
+**/
STATIC
EFI_STATUS
KbdFreeNotifyList (
IN OUT LIST_ENTRY *ListHead
)
-/*++
-
-Routine Description:
-
-Arguments:
-
- ListHead - The list head
-
-Returns:
-
- EFI_SUCCESS - Free the notify list successfully
- EFI_INVALID_PARAMETER - ListHead is invalid.
-
---*/
{
KEYBOARD_CONSOLE_IN_EX_NOTIFY *NotifyNode;
@@ -591,3 +574,4 @@ InitializePs2Keyboard(
return Status;
}
+
diff --git a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
index 1eb2c5491c..7953b2bc74 100644
--- a/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
+++ b/IntelFrameworkModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2Keyboard.h
@@ -131,28 +131,22 @@ extern EFI_GUID gSimpleTextInExNotifyGuid;
//
// Driver entry point
//
+/**
+ The user Entry Point for module Ps2Keyboard. The user code starts with this function.
+
+ @param[in] ImageHandle The firmware allocated handle for the EFI image.
+ @param[in] SystemTable A pointer to the EFI System Table.
+
+ @retval EFI_SUCCESS The entry point is executed successfully.
+ @retval other Some error occurs when executing this entry point.
+
+**/
EFI_STATUS
EFIAPI
InstallPs2KeyboardDriver (
IN EFI_HANDLE ImageHandle,
IN EFI_SYSTEM_TABLE *SystemTable
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ImageHandle - GC_TODO: add argument description
- SystemTable - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
#define KEYBOARD_8042_DATA_REGISTER 0x60
@@ -191,233 +185,170 @@ Returns:
//
// Other functions that are used among .c files
//
+/**
+ Show keyboard status lights according to
+ indicators in ConsoleIn.
+
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+
+ @return status
+**/
EFI_STATUS
UpdateStatusLights (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- Show keyboard status light for ScrollLock, NumLock and CapsLock
- according to indicators in ConsoleIn.
-
-Arguments:
-
- ConsoleIn - driver private structure
+;
-Returns:
+/**
+ write key to keyboard
- EFI_SUCCESS - Show the status light successfully.
- EFI_TIMEOUT - Timeout when operating read/write on registers.
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
+ @param Data value wanted to be written
---*/
-;
+ @retval EFI_TIMEOUT - GC_TODO: Add description for return value
+ @retval EFI_SUCCESS - GC_TODO: Add description for return value
+**/
EFI_STATUS
KeyboardRead (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
OUT UINT8 *Data
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
+;
- ConsoleIn - GC_TODO: add argument description
- Data - GC_TODO: add argument description
+/**
+ Get scancode from scancode buffer
+ and translate into EFI-scancode and unicode defined by EFI spec
+ The function is always called in TPL_NOTIFY
-Returns:
+ @param ConsoleIn KEYBOARD_CONSOLE_IN_DEV instance pointer
- GC_TODO: add return values
-
---*/
-;
+ @retval EFI_NOT_READY - Input from console not ready yet.
+ @retval EFI_SUCCESS - Function executed successfully.
+**/
EFI_STATUS
KeyGetchar (
IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Perform 8042 controller and keyboard Initialization
+ If ExtendedVerification is TRUE, do additional test for
+ the keyboard interface
---*/
-;
+ @param ConsoleIn - KEYBOARD_CONSOLE_IN_DEV instance pointer
+ @param ExtendedVerification - indicates a thorough initialization
+ @retval EFI_DEVICE_ERROR Fail to init keyboard
+ @retval EFI_SUCCESS Success to init keyboard
+**/
EFI_STATUS
InitKeyboard (
IN OUT KEYBOARD_CONSOLE_IN_DEV *ConsoleIn,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
- ExtendedVerification - GC_TODO: add argument description
+;
-Returns:
+/**
+ Disable the keyboard interface of the 8042 controller
- GC_TODO: add return values
+ @param ConsoleIn - the device instance
---*/
-;
+ @return status of issuing disable command
+**/
EFI_STATUS
DisableKeyboard (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Timer event handler: read a series of scancodes from 8042
+ and put them into memory scancode buffer.
+ it read as much scancodes to either fill
+ the memory buffer or empty the keyboard buffer.
+ It is registered as running under TPL_NOTIFY
---*/
-;
+ @param Event - The timer event
+ @param Context - A KEYBOARD_CONSOLE_IN_DEV pointer
+**/
VOID
EFIAPI
KeyboardTimerHandler (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- Event - GC_TODO: add argument description
- Context - GC_TODO: add argument description
+;
-Returns:
+/**
+ logic reset keyboard
+ Implement SIMPLE_TEXT_IN.Reset()
+ Perform 8042 controller and keyboard initialization
- GC_TODO: add return values
-
---*/
-;
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param 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
+**/
EFI_STATUS
EFIAPI
KeyboardEfiReset (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- ExtendedVerification - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Implement SIMPLE_TEXT_IN.ReadKeyStroke().
+ Retrieve key values for driver user.
---*/
-;
+ @param This Pointer to instance of EFI_SIMPLE_TEXT_INPUT_PROTOCOL
+ @param Key The output buffer for key value
+ @retval EFI_SUCCESS success to read key stroke
+**/
EFI_STATUS
EFIAPI
KeyboardReadKeyStroke (
IN EFI_SIMPLE_TEXT_INPUT_PROTOCOL *This,
OUT EFI_INPUT_KEY *Key
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- This - GC_TODO: add argument description
- Key - GC_TODO: add argument description
-
-Returns:
+;
- GC_TODO: add return values
+/**
+ Event notification function for SIMPLE_TEXT_IN.WaitForKey event
+ Signal the event if there is key available
---*/
-;
+ @param Event the event object
+ @param Context waitting context
+**/
VOID
EFIAPI
KeyboardWaitForKey (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- Event - GC_TODO: add argument description
- Context - GC_TODO: add argument description
+;
-Returns:
+/**
+ Read status register
- GC_TODO: add return values
+ @param ConsoleIn Pointer to instance of KEYBOARD_CONSOLE_IN_DEV
---*/
-;
+ @return value in status register
+**/
UINT8
KeyReadStatusRegister (
IN KEYBOARD_CONSOLE_IN_DEV *ConsoleIn
)
-/*++
-
-Routine Description:
-
- GC_TODO: Add function description
-
-Arguments:
-
- ConsoleIn - GC_TODO: add argument description
-
-Returns:
-
- GC_TODO: add return values
-
---*/
;
/**
@@ -437,106 +368,106 @@ CheckKeyboardConnect (
)
;
+/**
+ Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
+ Signal the event if there is key available
+
+ @param Event event object
+ @param Context waiting context
+
+**/
VOID
EFIAPI
KeyboardWaitForKeyEx (
IN EFI_EVENT Event,
IN VOID *Context
)
-/*++
-
-Routine Description:
-
- Event notification function for SIMPLE_TEXT_INPUT_EX_PROTOCOL.WaitForKeyEx event
- Signal the event if there is key available
-
-Arguments:
-
-Returns:
-
---*/
;
//
// Simple Text Input Ex protocol function prototypes
//
+/**
+ Reset the input device and optionaly run diagnostics
+
+ @param This - Protocol instance pointer.
+ @param ExtendedVerification - Driver may perform diagnostics on reset.
+
+ @retval EFI_SUCCESS - The device was reset.
+ @retval EFI_DEVICE_ERROR - The device is not functioning properly and could
+ not be reset.
+
+**/
EFI_STATUS
EFIAPI
KeyboardEfiResetEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN BOOLEAN ExtendedVerification
)
-/*++
+;
- Routine Description:
- Reset the input device and optionaly run diagnostics
+/**
+ Reads the next keystroke from the input device. The WaitForKey Event can
+ be used to test for existance of a keystroke via WaitForEvent () call.
- Arguments:
- This - Protocol instance pointer.
- ExtendedVerification - Driver may perform diagnostics on reset.
- Returns:
- EFI_SUCCESS - The device was reset.
- EFI_DEVICE_ERROR - The device is not functioning properly and could
- not be reset.
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ state data for the key that was pressed.
---*/
-;
+ @retval EFI_SUCCESS - The keystroke information was returned.
+ @retval EFI_NOT_READY - There was no keystroke data availiable.
+ @retval EFI_DEVICE_ERROR - The keystroke information was not returned due to
+ hardware errors.
+ @retval EFI_INVALID_PARAMETER - KeyData is NULL.
+**/
EFI_STATUS
EFIAPI
KeyboardReadKeyStrokeEx (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
OUT EFI_KEY_DATA *KeyData
)
-/*++
-
- Routine Description:
- Reads the next keystroke from the input device. The WaitForKey Event can
- be used to test for existance of a keystroke via WaitForEvent () call.
+;
- Arguments:
- 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.
+/**
+ Set certain state for the input device.
- Returns:
- EFI_SUCCESS - The keystroke information was returned.
- EFI_NOT_READY - There was no keystroke data availiable.
- EFI_DEVICE_ERROR - The keystroke information was not returned due to
- hardware errors.
- EFI_INVALID_PARAMETER - KeyData is NULL.
+ @param This - Protocol instance pointer.
+ @param KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
+ state for the input device.
---*/
-;
+ @retval EFI_SUCCESS - The device state was set successfully.
+ @retval EFI_DEVICE_ERROR - The device is not functioning correctly and could
+ not have the setting adjusted.
+ @retval EFI_UNSUPPORTED - The device does not have the ability to set its state.
+ @retval EFI_INVALID_PARAMETER - KeyToggleState is NULL.
+**/
EFI_STATUS
EFIAPI
KeyboardSetState (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_KEY_TOGGLE_STATE *KeyToggleState
)
-/*++
-
- Routine Description:
- Set certain state for the input device.
-
- Arguments:
- This - Protocol instance pointer.
- KeyToggleState - A pointer to the EFI_KEY_TOGGLE_STATE to set the
- state for the input device.
-
- Returns:
- 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.
-
---*/
;
+/**
+ Register a notification function for a particular keystroke for the input device.
+
+ @param This - Protocol instance pointer.
+ @param KeyData - A pointer to a buffer that is filled in with the keystroke
+ information data for the key that was pressed.
+ @param KeyNotificationFunction - Points to the function to be called when the key
+ sequence is typed specified by KeyData.
+ @param NotifyHandle - Points to the unique handle assigned to the registered notification.
+
+ @retval EFI_SUCCESS - The notification function was registered successfully.
+ @retval EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
+ @retval EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+**/
EFI_STATUS
EFIAPI
KeyboardRegisterKeyNotify (
@@ -545,48 +476,26 @@ KeyboardRegisterKeyNotify (
IN EFI_KEY_NOTIFY_FUNCTION KeyNotificationFunction,
OUT EFI_HANDLE *NotifyHandle
)
-/*++
+;
- Routine Description:
- Register a notification function for a particular keystroke for the input device.
+/**
+ Remove a registered notification function from a particular keystroke.
- Arguments:
- 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.
- KeyNotificationFunction - Points to the function to be called when the key
- sequence is typed specified by KeyData.
- NotifyHandle - Points to the unique handle assigned to the registered notification.
+ @param This - Protocol instance pointer.
+ @param NotificationHandle - The handle of the notification function being unregistered.
- Returns:
- EFI_SUCCESS - The notification function was registered successfully.
- EFI_OUT_OF_RESOURCES - Unable to allocate resources for necesssary data structures.
- EFI_INVALID_PARAMETER - KeyData or NotifyHandle is NULL.
+
+ @retval EFI_SUCCESS - The notification function was unregistered successfully.
+ @retval EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
+ @retval EFI_NOT_FOUND - Can not find the matching entry in database.
---*/
-;
-
+**/
EFI_STATUS
EFIAPI
KeyboardUnregisterKeyNotify (
IN EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *This,
IN EFI_HANDLE NotificationHandle
)
-/*++
-
- Routine Description:
- Remove a registered notification function from a particular keystroke.
-
- Arguments:
- This - Protocol instance pointer.
- NotificationHandle - The handle of the notification function being unregistered.
-
- Returns:
- EFI_SUCCESS - The notification function was unregistered successfully.
- EFI_INVALID_PARAMETER - The NotificationHandle is invalid.
- EFI_NOT_FOUND - Can not find the matching entry in database.
-
---*/
;
#endif