MdeModulePkg: Apply uncrustify changes
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3737 Apply uncrustify changes to .c/.h files in the MdeModulePkg package Cc: Andrew Fish <afish@apple.com> Cc: Leif Lindholm <leif@nuviainc.com> Cc: Michael D Kinney <michael.d.kinney@intel.com> Signed-off-by: Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by: Liming Gao <gaoliming@byosoft.com.cn>
This commit is contained in:
committed by
mergify[bot]
parent
7c7184e201
commit
1436aea4d5
@@ -6,7 +6,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
**/
|
||||
|
||||
|
||||
#include "UsbMouse.h"
|
||||
|
||||
//
|
||||
@@ -21,16 +20,15 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME_PROTOCOL gUsbMouseComponentNam
|
||||
//
|
||||
// EFI Component Name 2 Protocol
|
||||
//
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseComponentName2 = {
|
||||
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME) UsbMouseComponentNameGetDriverName,
|
||||
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME) UsbMouseComponentNameGetControllerName,
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseComponentName2 = {
|
||||
(EFI_COMPONENT_NAME2_GET_DRIVER_NAME)UsbMouseComponentNameGetDriverName,
|
||||
(EFI_COMPONENT_NAME2_GET_CONTROLLER_NAME)UsbMouseComponentNameGetControllerName,
|
||||
"en"
|
||||
};
|
||||
|
||||
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUsbMouseDriverNameTable[] = {
|
||||
GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUsbMouseDriverNameTable[] = {
|
||||
{ "eng;en", L"Usb Mouse Driver" },
|
||||
{ NULL , NULL }
|
||||
{ NULL, NULL }
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -145,17 +143,17 @@ UsbMouseComponentNameGetDriverName (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UsbMouseComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
USB_MOUSE_DEV *UsbMouseDev;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
|
||||
EFI_USB_IO_PROTOCOL *UsbIoProtocol;
|
||||
EFI_STATUS Status;
|
||||
USB_MOUSE_DEV *UsbMouseDev;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
|
||||
EFI_USB_IO_PROTOCOL *UsbIoProtocol;
|
||||
|
||||
//
|
||||
// This is a device driver, so ChildHandle must be NULL.
|
||||
@@ -170,7 +168,7 @@ UsbMouseComponentNameGetControllerName (
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiUsbIoProtocolGuid,
|
||||
(VOID **) &UsbIoProtocol,
|
||||
(VOID **)&UsbIoProtocol,
|
||||
gUsbMouseDriverBinding.DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
@@ -189,13 +187,14 @@ UsbMouseComponentNameGetControllerName (
|
||||
if (Status != EFI_ALREADY_STARTED) {
|
||||
return EFI_UNSUPPORTED;
|
||||
}
|
||||
|
||||
//
|
||||
// Get the device context
|
||||
//
|
||||
Status = gBS->OpenProtocol (
|
||||
ControllerHandle,
|
||||
&gEfiSimplePointerProtocolGuid,
|
||||
(VOID **) &SimplePointerProtocol,
|
||||
&gEfiSimplePointerProtocolGuid,
|
||||
(VOID **)&SimplePointerProtocol,
|
||||
gUsbMouseDriverBinding.DriverBindingHandle,
|
||||
ControllerHandle,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
@@ -214,5 +213,4 @@ UsbMouseComponentNameGetControllerName (
|
||||
ControllerName,
|
||||
(BOOLEAN)(This == &gUsbMouseComponentName)
|
||||
);
|
||||
|
||||
}
|
||||
|
@@ -8,7 +8,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
#include "UsbMouse.h"
|
||||
|
||||
|
||||
/**
|
||||
Get next HID item from report descriptor.
|
||||
|
||||
@@ -31,12 +30,12 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
**/
|
||||
UINT8 *
|
||||
GetNextHidItem (
|
||||
IN UINT8 *StartPos,
|
||||
IN UINT8 *EndPos,
|
||||
OUT HID_ITEM *HidItem
|
||||
IN UINT8 *StartPos,
|
||||
IN UINT8 *EndPos,
|
||||
OUT HID_ITEM *HidItem
|
||||
)
|
||||
{
|
||||
UINT8 Temp;
|
||||
UINT8 Temp;
|
||||
|
||||
if (EndPos <= StartPos) {
|
||||
return NULL;
|
||||
@@ -66,7 +65,7 @@ GetNextHidItem (
|
||||
|
||||
if ((EndPos - StartPos) >= HidItem->Size) {
|
||||
HidItem->Data.LongData = StartPos;
|
||||
StartPos += HidItem->Size;
|
||||
StartPos += HidItem->Size;
|
||||
return StartPos;
|
||||
}
|
||||
}
|
||||
@@ -75,48 +74,47 @@ GetNextHidItem (
|
||||
HidItem->Size = BitFieldRead8 (Temp, 0, 1);
|
||||
|
||||
switch (HidItem->Size) {
|
||||
case 0:
|
||||
//
|
||||
// No data
|
||||
//
|
||||
return StartPos;
|
||||
|
||||
case 1:
|
||||
//
|
||||
// 1-byte data
|
||||
//
|
||||
if ((EndPos - StartPos) >= 1) {
|
||||
HidItem->Data.Uint8 = *StartPos++;
|
||||
case 0:
|
||||
//
|
||||
// No data
|
||||
//
|
||||
return StartPos;
|
||||
}
|
||||
|
||||
case 2:
|
||||
//
|
||||
// 2-byte data
|
||||
//
|
||||
if ((EndPos - StartPos) >= 2) {
|
||||
CopyMem (&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
|
||||
StartPos += 2;
|
||||
return StartPos;
|
||||
}
|
||||
case 1:
|
||||
//
|
||||
// 1-byte data
|
||||
//
|
||||
if ((EndPos - StartPos) >= 1) {
|
||||
HidItem->Data.Uint8 = *StartPos++;
|
||||
return StartPos;
|
||||
}
|
||||
|
||||
case 3:
|
||||
//
|
||||
// 4-byte data, adjust size
|
||||
//
|
||||
HidItem->Size = 4;
|
||||
if ((EndPos - StartPos) >= 4) {
|
||||
CopyMem (&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
|
||||
StartPos += 4;
|
||||
return StartPos;
|
||||
}
|
||||
case 2:
|
||||
//
|
||||
// 2-byte data
|
||||
//
|
||||
if ((EndPos - StartPos) >= 2) {
|
||||
CopyMem (&HidItem->Data.Uint16, StartPos, sizeof (UINT16));
|
||||
StartPos += 2;
|
||||
return StartPos;
|
||||
}
|
||||
|
||||
case 3:
|
||||
//
|
||||
// 4-byte data, adjust size
|
||||
//
|
||||
HidItem->Size = 4;
|
||||
if ((EndPos - StartPos) >= 4) {
|
||||
CopyMem (&HidItem->Data.Uint32, StartPos, sizeof (UINT32));
|
||||
StartPos += 4;
|
||||
return StartPos;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Get data from HID item.
|
||||
|
||||
@@ -131,20 +129,21 @@ GetNextHidItem (
|
||||
**/
|
||||
UINT32
|
||||
GetItemData (
|
||||
IN HID_ITEM *HidItem
|
||||
IN HID_ITEM *HidItem
|
||||
)
|
||||
{
|
||||
//
|
||||
// Get data from HID item.
|
||||
//
|
||||
switch (HidItem->Size) {
|
||||
case 1:
|
||||
return HidItem->Data.Uint8;
|
||||
case 2:
|
||||
return HidItem->Data.Uint16;
|
||||
case 4:
|
||||
return HidItem->Data.Uint32;
|
||||
case 1:
|
||||
return HidItem->Data.Uint8;
|
||||
case 2:
|
||||
return HidItem->Data.Uint16;
|
||||
case 4:
|
||||
return HidItem->Data.Uint32;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -161,67 +160,68 @@ GetItemData (
|
||||
**/
|
||||
VOID
|
||||
ParseHidItem (
|
||||
IN USB_MOUSE_DEV *UsbMouse,
|
||||
IN HID_ITEM *HidItem
|
||||
IN USB_MOUSE_DEV *UsbMouse,
|
||||
IN HID_ITEM *HidItem
|
||||
)
|
||||
{
|
||||
UINT8 Data;
|
||||
|
||||
switch (HidItem->Type) {
|
||||
|
||||
case HID_ITEM_TYPE_MAIN:
|
||||
//
|
||||
// we don't care any main items, just skip
|
||||
//
|
||||
return;
|
||||
|
||||
case HID_ITEM_TYPE_GLOBAL:
|
||||
//
|
||||
// For global items, we only care Usage Page tag for Button Page here
|
||||
//
|
||||
if (HidItem->Tag == HID_GLOBAL_ITEM_TAG_USAGE_PAGE) {
|
||||
Data = (UINT8) GetItemData (HidItem);
|
||||
if (Data == 0x09) {
|
||||
//
|
||||
// Button Page
|
||||
//
|
||||
UsbMouse->PrivateData.ButtonDetected = TRUE;
|
||||
}
|
||||
}
|
||||
return;
|
||||
|
||||
case HID_ITEM_TYPE_LOCAL:
|
||||
if (HidItem->Size == 0) {
|
||||
case HID_ITEM_TYPE_MAIN:
|
||||
//
|
||||
// No expected data for local item
|
||||
// we don't care any main items, just skip
|
||||
//
|
||||
return ;
|
||||
}
|
||||
|
||||
Data = (UINT8) GetItemData (HidItem);
|
||||
|
||||
switch (HidItem->Tag) {
|
||||
case HID_LOCAL_ITEM_TAG_USAGE_MINIMUM:
|
||||
if (UsbMouse->PrivateData.ButtonDetected) {
|
||||
UsbMouse->PrivateData.ButtonMinIndex = Data;
|
||||
}
|
||||
return ;
|
||||
|
||||
case HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM:
|
||||
{
|
||||
if (UsbMouse->PrivateData.ButtonDetected) {
|
||||
UsbMouse->PrivateData.ButtonMaxIndex = Data;
|
||||
}
|
||||
return ;
|
||||
}
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
|
||||
case HID_ITEM_TYPE_GLOBAL:
|
||||
//
|
||||
// For global items, we only care Usage Page tag for Button Page here
|
||||
//
|
||||
if (HidItem->Tag == HID_GLOBAL_ITEM_TAG_USAGE_PAGE) {
|
||||
Data = (UINT8)GetItemData (HidItem);
|
||||
if (Data == 0x09) {
|
||||
//
|
||||
// Button Page
|
||||
//
|
||||
UsbMouse->PrivateData.ButtonDetected = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
case HID_ITEM_TYPE_LOCAL:
|
||||
if (HidItem->Size == 0) {
|
||||
//
|
||||
// No expected data for local item
|
||||
//
|
||||
return;
|
||||
}
|
||||
|
||||
Data = (UINT8)GetItemData (HidItem);
|
||||
|
||||
switch (HidItem->Tag) {
|
||||
case HID_LOCAL_ITEM_TAG_USAGE_MINIMUM:
|
||||
if (UsbMouse->PrivateData.ButtonDetected) {
|
||||
UsbMouse->PrivateData.ButtonMinIndex = Data;
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
case HID_LOCAL_ITEM_TAG_USAGE_MAXIMUM:
|
||||
{
|
||||
if (UsbMouse->PrivateData.ButtonDetected) {
|
||||
UsbMouse->PrivateData.ButtonMaxIndex = Data;
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
default:
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Parse Mouse Report Descriptor.
|
||||
|
||||
@@ -240,9 +240,9 @@ ParseHidItem (
|
||||
**/
|
||||
EFI_STATUS
|
||||
ParseMouseReportDescriptor (
|
||||
OUT USB_MOUSE_DEV *UsbMouse,
|
||||
IN UINT8 *ReportDescriptor,
|
||||
IN UINTN ReportSize
|
||||
OUT USB_MOUSE_DEV *UsbMouse,
|
||||
IN UINT8 *ReportDescriptor,
|
||||
IN UINTN ReportSize
|
||||
)
|
||||
{
|
||||
UINT8 *DescriptorEnd;
|
||||
@@ -265,11 +265,11 @@ ParseMouseReportDescriptor (
|
||||
Ptr = GetNextHidItem (Ptr, DescriptorEnd, &HidItem);
|
||||
}
|
||||
|
||||
UsbMouse->NumberOfButtons = (UINT8) (UsbMouse->PrivateData.ButtonMaxIndex - UsbMouse->PrivateData.ButtonMinIndex + 1);
|
||||
UsbMouse->XLogicMax = 127;
|
||||
UsbMouse->YLogicMax = 127;
|
||||
UsbMouse->XLogicMin = -127;
|
||||
UsbMouse->YLogicMin = -127;
|
||||
UsbMouse->NumberOfButtons = (UINT8)(UsbMouse->PrivateData.ButtonMaxIndex - UsbMouse->PrivateData.ButtonMinIndex + 1);
|
||||
UsbMouse->XLogicMax = 127;
|
||||
UsbMouse->YLogicMax = 127;
|
||||
UsbMouse->XLogicMin = -127;
|
||||
UsbMouse->YLogicMin = -127;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
@@ -8,7 +8,7 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
#include "UsbMouse.h"
|
||||
|
||||
EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
|
||||
EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
|
||||
USBMouseDriverBindingSupported,
|
||||
USBMouseDriverBindingStart,
|
||||
USBMouseDriverBindingStop,
|
||||
@@ -32,11 +32,11 @@ EFI_DRIVER_BINDING_PROTOCOL gUsbMouseDriverBinding = {
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
USBMouseDriverBindingEntryPoint (
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
IN EFI_HANDLE ImageHandle,
|
||||
IN EFI_SYSTEM_TABLE *SystemTable
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_STATUS Status;
|
||||
|
||||
Status = EfiLibInstallDriverBindingComponentName2 (
|
||||
ImageHandle,
|
||||
@@ -51,7 +51,6 @@ USBMouseDriverBindingEntryPoint (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Check whether USB mouse driver supports this device.
|
||||
|
||||
@@ -66,18 +65,18 @@ USBMouseDriverBindingEntryPoint (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
USBMouseDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiUsbIoProtocolGuid,
|
||||
(VOID **) &UsbIo,
|
||||
(VOID **)&UsbIo,
|
||||
This->DriverBindingHandle,
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
@@ -96,16 +95,15 @@ USBMouseDriverBindingSupported (
|
||||
}
|
||||
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiUsbIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
Controller,
|
||||
&gEfiUsbIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Starts the mouse device with this driver.
|
||||
|
||||
@@ -128,22 +126,22 @@ USBMouseDriverBindingSupported (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
USBMouseDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
UINT8 EndpointNumber;
|
||||
EFI_USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
|
||||
UINT8 Index;
|
||||
UINT8 EndpointAddr;
|
||||
UINT8 PollingInterval;
|
||||
UINT8 PacketSize;
|
||||
BOOLEAN Found;
|
||||
EFI_TPL OldTpl;
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
UINT8 EndpointNumber;
|
||||
EFI_USB_ENDPOINT_DESCRIPTOR EndpointDescriptor;
|
||||
UINT8 Index;
|
||||
UINT8 EndpointAddr;
|
||||
UINT8 PollingInterval;
|
||||
UINT8 PacketSize;
|
||||
BOOLEAN Found;
|
||||
EFI_TPL OldTpl;
|
||||
|
||||
OldTpl = gBS->RaiseTPL (TPL_CALLBACK);
|
||||
//
|
||||
@@ -152,7 +150,7 @@ USBMouseDriverBindingStart (
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiUsbIoProtocolGuid,
|
||||
(VOID **) &UsbIo,
|
||||
(VOID **)&UsbIo,
|
||||
This->DriverBindingHandle,
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_BY_DRIVER
|
||||
@@ -173,7 +171,7 @@ USBMouseDriverBindingStart (
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiDevicePathProtocolGuid,
|
||||
(VOID **) &UsbMouseDevice->DevicePath,
|
||||
(VOID **)&UsbMouseDevice->DevicePath,
|
||||
This->DriverBindingHandle,
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
@@ -214,11 +212,12 @@ USBMouseDriverBindingStart (
|
||||
);
|
||||
|
||||
if (((EndpointDescriptor.Attributes & (BIT0 | BIT1)) == USB_ENDPOINT_INTERRUPT) &&
|
||||
((EndpointDescriptor.EndpointAddress & USB_ENDPOINT_DIR_IN) != 0)) {
|
||||
((EndpointDescriptor.EndpointAddress & USB_ENDPOINT_DIR_IN) != 0))
|
||||
{
|
||||
//
|
||||
// We only care interrupt endpoint here
|
||||
//
|
||||
CopyMem(&UsbMouseDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof(EndpointDescriptor));
|
||||
CopyMem (&UsbMouseDevice->IntEndpointDescriptor, &EndpointDescriptor, sizeof (EndpointDescriptor));
|
||||
Found = TRUE;
|
||||
break;
|
||||
}
|
||||
@@ -265,9 +264,9 @@ USBMouseDriverBindingStart (
|
||||
//
|
||||
// Initialize and install EFI Simple Pointer Protocol.
|
||||
//
|
||||
UsbMouseDevice->SimplePointerProtocol.GetState = GetMouseState;
|
||||
UsbMouseDevice->SimplePointerProtocol.Reset = UsbMouseReset;
|
||||
UsbMouseDevice->SimplePointerProtocol.Mode = &UsbMouseDevice->Mode;
|
||||
UsbMouseDevice->SimplePointerProtocol.GetState = GetMouseState;
|
||||
UsbMouseDevice->SimplePointerProtocol.Reset = UsbMouseReset;
|
||||
UsbMouseDevice->SimplePointerProtocol.Mode = &UsbMouseDevice->Mode;
|
||||
|
||||
Status = gBS->CreateEvent (
|
||||
EVT_NOTIFY_WAIT,
|
||||
@@ -307,7 +306,7 @@ USBMouseDriverBindingStart (
|
||||
//
|
||||
EndpointAddr = UsbMouseDevice->IntEndpointDescriptor.EndpointAddress;
|
||||
PollingInterval = UsbMouseDevice->IntEndpointDescriptor.Interval;
|
||||
PacketSize = (UINT8) (UsbMouseDevice->IntEndpointDescriptor.MaxPacketSize);
|
||||
PacketSize = (UINT8)(UsbMouseDevice->IntEndpointDescriptor.MaxPacketSize);
|
||||
|
||||
Status = UsbIo->UsbAsyncInterruptTransfer (
|
||||
UsbIo,
|
||||
@@ -351,17 +350,17 @@ USBMouseDriverBindingStart (
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
//
|
||||
// Error handler
|
||||
//
|
||||
//
|
||||
// Error handler
|
||||
//
|
||||
ErrorExit:
|
||||
if (EFI_ERROR (Status)) {
|
||||
gBS->CloseProtocol (
|
||||
Controller,
|
||||
&gEfiUsbIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
Controller,
|
||||
&gEfiUsbIoProtocolGuid,
|
||||
This->DriverBindingHandle,
|
||||
Controller
|
||||
);
|
||||
|
||||
if (UsbMouseDevice != NULL) {
|
||||
if ((UsbMouseDevice->SimplePointerProtocol).WaitForInput != NULL) {
|
||||
@@ -378,7 +377,6 @@ ErrorExit1:
|
||||
return Status;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Stop the USB mouse device handled by this driver.
|
||||
|
||||
@@ -395,21 +393,21 @@ ErrorExit1:
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
USBMouseDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
EFI_STATUS Status;
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL *SimplePointerProtocol;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
Status = gBS->OpenProtocol (
|
||||
Controller,
|
||||
&gEfiSimplePointerProtocolGuid,
|
||||
(VOID **) &SimplePointerProtocol,
|
||||
(VOID **)&SimplePointerProtocol,
|
||||
This->DriverBindingHandle,
|
||||
Controller,
|
||||
EFI_OPEN_PROTOCOL_GET_PROTOCOL
|
||||
@@ -478,10 +476,8 @@ USBMouseDriverBindingStop (
|
||||
FreePool (UsbMouseDevice);
|
||||
|
||||
return EFI_SUCCESS;
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Uses USB I/O to check whether the device is a USB mouse device.
|
||||
|
||||
@@ -493,7 +489,7 @@ USBMouseDriverBindingStop (
|
||||
**/
|
||||
BOOLEAN
|
||||
IsUsbMouse (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo
|
||||
)
|
||||
{
|
||||
EFI_STATUS Status;
|
||||
@@ -514,14 +510,14 @@ IsUsbMouse (
|
||||
if ((InterfaceDescriptor.InterfaceClass == CLASS_HID) &&
|
||||
(InterfaceDescriptor.InterfaceSubClass == SUBCLASS_BOOT) &&
|
||||
(InterfaceDescriptor.InterfaceProtocol == PROTOCOL_MOUSE)
|
||||
) {
|
||||
)
|
||||
{
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Initialize the USB mouse device.
|
||||
|
||||
@@ -539,20 +535,20 @@ IsUsbMouse (
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializeUsbMouseDevice (
|
||||
IN OUT USB_MOUSE_DEV *UsbMouseDev
|
||||
IN OUT USB_MOUSE_DEV *UsbMouseDev
|
||||
)
|
||||
{
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
UINT8 Protocol;
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_HID_DESCRIPTOR *MouseHidDesc;
|
||||
UINT8 *ReportDesc;
|
||||
EFI_USB_CONFIG_DESCRIPTOR ConfigDesc;
|
||||
VOID *Buf;
|
||||
UINT32 TransferResult;
|
||||
UINT16 Total;
|
||||
USB_DESC_HEAD *Head;
|
||||
BOOLEAN Start;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
UINT8 Protocol;
|
||||
EFI_STATUS Status;
|
||||
EFI_USB_HID_DESCRIPTOR *MouseHidDesc;
|
||||
UINT8 *ReportDesc;
|
||||
EFI_USB_CONFIG_DESCRIPTOR ConfigDesc;
|
||||
VOID *Buf;
|
||||
UINT32 TransferResult;
|
||||
UINT16 Total;
|
||||
USB_DESC_HEAD *Head;
|
||||
BOOLEAN Start;
|
||||
|
||||
UsbIo = UsbMouseDev->UsbIo;
|
||||
|
||||
@@ -589,9 +585,9 @@ InitializeUsbMouseDevice (
|
||||
return Status;
|
||||
}
|
||||
|
||||
Total = 0;
|
||||
Start = FALSE;
|
||||
Head = (USB_DESC_HEAD *)Buf;
|
||||
Total = 0;
|
||||
Start = FALSE;
|
||||
Head = (USB_DESC_HEAD *)Buf;
|
||||
MouseHidDesc = NULL;
|
||||
|
||||
//
|
||||
@@ -602,19 +598,23 @@ InitializeUsbMouseDevice (
|
||||
while (Total < ConfigDesc.TotalLength) {
|
||||
if (Head->Type == USB_DESC_TYPE_INTERFACE) {
|
||||
if ((((USB_INTERFACE_DESCRIPTOR *)Head)->InterfaceNumber == UsbMouseDev->InterfaceDescriptor.InterfaceNumber) &&
|
||||
(((USB_INTERFACE_DESCRIPTOR *)Head)->AlternateSetting == UsbMouseDev->InterfaceDescriptor.AlternateSetting)) {
|
||||
(((USB_INTERFACE_DESCRIPTOR *)Head)->AlternateSetting == UsbMouseDev->InterfaceDescriptor.AlternateSetting))
|
||||
{
|
||||
Start = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
if (Start && (Head->Type == USB_DESC_TYPE_ENDPOINT)) {
|
||||
break;
|
||||
}
|
||||
|
||||
if (Start && (Head->Type == USB_DESC_TYPE_HID)) {
|
||||
MouseHidDesc = (EFI_USB_HID_DESCRIPTOR *)Head;
|
||||
break;
|
||||
}
|
||||
|
||||
Total = Total + (UINT16)Head->Len;
|
||||
Head = (USB_DESC_HEAD*)((UINT8 *)Buf + Total);
|
||||
Head = (USB_DESC_HEAD *)((UINT8 *)Buf + Total);
|
||||
}
|
||||
|
||||
if (MouseHidDesc == NULL) {
|
||||
@@ -668,9 +668,11 @@ InitializeUsbMouseDevice (
|
||||
if (UsbMouseDev->NumberOfButtons >= 1) {
|
||||
UsbMouseDev->Mode.LeftButton = TRUE;
|
||||
}
|
||||
|
||||
if (UsbMouseDev->NumberOfButtons > 1) {
|
||||
UsbMouseDev->Mode.RightButton = TRUE;
|
||||
}
|
||||
|
||||
UsbMouseDev->Mode.ResolutionX = 8;
|
||||
UsbMouseDev->Mode.ResolutionY = 8;
|
||||
UsbMouseDev->Mode.ResolutionZ = 0;
|
||||
@@ -720,7 +722,6 @@ InitializeUsbMouseDevice (
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Handler function for USB mouse's asynchronous interrupt transfer.
|
||||
|
||||
@@ -741,19 +742,19 @@ InitializeUsbMouseDevice (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
OnMouseInterruptComplete (
|
||||
IN VOID *Data,
|
||||
IN UINTN DataLength,
|
||||
IN VOID *Context,
|
||||
IN UINT32 Result
|
||||
IN VOID *Data,
|
||||
IN UINTN DataLength,
|
||||
IN VOID *Context,
|
||||
IN UINT32 Result
|
||||
)
|
||||
{
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
UINT8 EndpointAddr;
|
||||
UINT32 UsbResult;
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
UINT8 EndpointAddr;
|
||||
UINT32 UsbResult;
|
||||
|
||||
UsbMouseDevice = (USB_MOUSE_DEV *) Context;
|
||||
UsbIo = UsbMouseDevice->UsbIo;
|
||||
UsbMouseDevice = (USB_MOUSE_DEV *)Context;
|
||||
UsbIo = UsbMouseDevice->UsbIo;
|
||||
|
||||
if (Result != EFI_USB_NOERROR) {
|
||||
//
|
||||
@@ -802,7 +803,7 @@ OnMouseInterruptComplete (
|
||||
//
|
||||
// If no error and no data, just return EFI_SUCCESS.
|
||||
//
|
||||
if (DataLength == 0 || Data == NULL) {
|
||||
if ((DataLength == 0) || (Data == NULL)) {
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
@@ -824,13 +825,13 @@ OnMouseInterruptComplete (
|
||||
|
||||
UsbMouseDevice->StateChanged = TRUE;
|
||||
|
||||
UsbMouseDevice->State.LeftButton = (BOOLEAN) ((*(UINT8 *) Data & BIT0) != 0);
|
||||
UsbMouseDevice->State.RightButton = (BOOLEAN) ((*(UINT8 *) Data & BIT1) != 0);
|
||||
UsbMouseDevice->State.RelativeMovementX += *((INT8 *) Data + 1);
|
||||
UsbMouseDevice->State.RelativeMovementY += *((INT8 *) Data + 2);
|
||||
UsbMouseDevice->State.LeftButton = (BOOLEAN)((*(UINT8 *)Data & BIT0) != 0);
|
||||
UsbMouseDevice->State.RightButton = (BOOLEAN)((*(UINT8 *)Data & BIT1) != 0);
|
||||
UsbMouseDevice->State.RelativeMovementX += *((INT8 *)Data + 1);
|
||||
UsbMouseDevice->State.RelativeMovementY += *((INT8 *)Data + 2);
|
||||
|
||||
if (DataLength > 3) {
|
||||
UsbMouseDevice->State.RelativeMovementZ += *((INT8 *) Data + 3);
|
||||
UsbMouseDevice->State.RelativeMovementZ += *((INT8 *)Data + 3);
|
||||
}
|
||||
|
||||
return EFI_SUCCESS;
|
||||
@@ -857,7 +858,7 @@ GetMouseState (
|
||||
OUT EFI_SIMPLE_POINTER_STATE *MouseState
|
||||
)
|
||||
{
|
||||
USB_MOUSE_DEV *MouseDev;
|
||||
USB_MOUSE_DEV *MouseDev;
|
||||
|
||||
if (MouseState == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
@@ -885,12 +886,11 @@ GetMouseState (
|
||||
MouseDev->State.RelativeMovementY = 0;
|
||||
MouseDev->State.RelativeMovementZ = 0;
|
||||
|
||||
MouseDev->StateChanged = FALSE;
|
||||
MouseDev->StateChanged = FALSE;
|
||||
|
||||
return EFI_SUCCESS;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
Resets the pointer device hardware.
|
||||
|
||||
@@ -905,13 +905,13 @@ GetMouseState (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UsbMouseReset (
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
)
|
||||
{
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
USB_MOUSE_DEV *UsbMouseDevice;
|
||||
|
||||
UsbMouseDevice = USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL (This);
|
||||
UsbMouseDevice = USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL (This);
|
||||
|
||||
REPORT_STATUS_CODE_WITH_DEVICE_PATH (
|
||||
EFI_PROGRESS_CODE,
|
||||
@@ -941,13 +941,13 @@ UsbMouseReset (
|
||||
VOID
|
||||
EFIAPI
|
||||
UsbMouseWaitForInput (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
USB_MOUSE_DEV *UsbMouseDev;
|
||||
USB_MOUSE_DEV *UsbMouseDev;
|
||||
|
||||
UsbMouseDev = (USB_MOUSE_DEV *) Context;
|
||||
UsbMouseDev = (USB_MOUSE_DEV *)Context;
|
||||
|
||||
//
|
||||
// If there's input from mouse, signal the event.
|
||||
@@ -973,16 +973,16 @@ UsbMouseWaitForInput (
|
||||
VOID
|
||||
EFIAPI
|
||||
USBMouseRecoveryHandler (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
)
|
||||
{
|
||||
USB_MOUSE_DEV *UsbMouseDev;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
USB_MOUSE_DEV *UsbMouseDev;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
|
||||
UsbMouseDev = (USB_MOUSE_DEV *) Context;
|
||||
UsbMouseDev = (USB_MOUSE_DEV *)Context;
|
||||
|
||||
UsbIo = UsbMouseDev->UsbIo;
|
||||
UsbIo = UsbMouseDev->UsbIo;
|
||||
|
||||
//
|
||||
// Re-submit Asynchronous Interrupt Transfer for recovery.
|
||||
|
@@ -9,7 +9,6 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
#ifndef _EFI_USB_MOUSE_H_
|
||||
#define _EFI_USB_MOUSE_H_
|
||||
|
||||
|
||||
#include <Uefi.h>
|
||||
|
||||
#include <Protocol/SimplePointer.h>
|
||||
@@ -27,14 +26,14 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
|
||||
#include <IndustryStandard/Usb.h>
|
||||
|
||||
#define CLASS_HID 3
|
||||
#define SUBCLASS_BOOT 1
|
||||
#define PROTOCOL_MOUSE 2
|
||||
#define CLASS_HID 3
|
||||
#define SUBCLASS_BOOT 1
|
||||
#define PROTOCOL_MOUSE 2
|
||||
|
||||
#define BOOT_PROTOCOL 0
|
||||
#define REPORT_PROTOCOL 1
|
||||
#define BOOT_PROTOCOL 0
|
||||
#define REPORT_PROTOCOL 1
|
||||
|
||||
#define USB_MOUSE_DEV_SIGNATURE SIGNATURE_32 ('u', 'm', 'o', 'u')
|
||||
#define USB_MOUSE_DEV_SIGNATURE SIGNATURE_32 ('u', 'm', 'o', 'u')
|
||||
|
||||
//
|
||||
// A common header for usb standard descriptor.
|
||||
@@ -42,8 +41,8 @@ SPDX-License-Identifier: BSD-2-Clause-Patent
|
||||
//
|
||||
#pragma pack(1)
|
||||
typedef struct {
|
||||
UINT8 Len;
|
||||
UINT8 Type;
|
||||
UINT8 Len;
|
||||
UINT8 Type;
|
||||
} USB_DESC_HEAD;
|
||||
#pragma pack()
|
||||
|
||||
@@ -51,33 +50,33 @@ typedef struct {
|
||||
/// Button range and status
|
||||
///
|
||||
typedef struct {
|
||||
BOOLEAN ButtonDetected;
|
||||
UINT8 ButtonMinIndex;
|
||||
UINT8 ButtonMaxIndex;
|
||||
UINT8 Reserved;
|
||||
BOOLEAN ButtonDetected;
|
||||
UINT8 ButtonMinIndex;
|
||||
UINT8 ButtonMaxIndex;
|
||||
UINT8 Reserved;
|
||||
} USB_MOUSE_BUTTON_DATA;
|
||||
|
||||
///
|
||||
/// Device instance of USB mouse.
|
||||
///
|
||||
typedef struct {
|
||||
UINTN Signature;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_EVENT DelayedRecoveryEvent;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
|
||||
EFI_USB_ENDPOINT_DESCRIPTOR IntEndpointDescriptor;
|
||||
UINT8 NumberOfButtons;
|
||||
INT32 XLogicMax;
|
||||
INT32 XLogicMin;
|
||||
INT32 YLogicMax;
|
||||
INT32 YLogicMin;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL SimplePointerProtocol;
|
||||
EFI_SIMPLE_POINTER_STATE State;
|
||||
EFI_SIMPLE_POINTER_MODE Mode;
|
||||
BOOLEAN StateChanged;
|
||||
USB_MOUSE_BUTTON_DATA PrivateData;
|
||||
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
|
||||
UINTN Signature;
|
||||
EFI_DEVICE_PATH_PROTOCOL *DevicePath;
|
||||
EFI_EVENT DelayedRecoveryEvent;
|
||||
EFI_USB_IO_PROTOCOL *UsbIo;
|
||||
EFI_USB_INTERFACE_DESCRIPTOR InterfaceDescriptor;
|
||||
EFI_USB_ENDPOINT_DESCRIPTOR IntEndpointDescriptor;
|
||||
UINT8 NumberOfButtons;
|
||||
INT32 XLogicMax;
|
||||
INT32 XLogicMin;
|
||||
INT32 YLogicMax;
|
||||
INT32 YLogicMin;
|
||||
EFI_SIMPLE_POINTER_PROTOCOL SimplePointerProtocol;
|
||||
EFI_SIMPLE_POINTER_STATE State;
|
||||
EFI_SIMPLE_POINTER_MODE Mode;
|
||||
BOOLEAN StateChanged;
|
||||
USB_MOUSE_BUTTON_DATA PrivateData;
|
||||
EFI_UNICODE_STRING_TABLE *ControllerNameTable;
|
||||
} USB_MOUSE_DEV;
|
||||
|
||||
///
|
||||
@@ -85,21 +84,21 @@ typedef struct {
|
||||
///
|
||||
|
||||
typedef union {
|
||||
UINT8 Uint8;
|
||||
UINT16 Uint16;
|
||||
UINT32 Uint32;
|
||||
INT8 Int8;
|
||||
INT16 Int16;
|
||||
INT32 Int32;
|
||||
UINT8 *LongData;
|
||||
UINT8 Uint8;
|
||||
UINT16 Uint16;
|
||||
UINT32 Uint32;
|
||||
INT8 Int8;
|
||||
INT16 Int16;
|
||||
INT32 Int32;
|
||||
UINT8 *LongData;
|
||||
} HID_DATA;
|
||||
|
||||
typedef struct {
|
||||
UINT16 Format;
|
||||
UINT8 Size;
|
||||
UINT8 Type;
|
||||
UINT8 Tag;
|
||||
HID_DATA Data;
|
||||
UINT16 Format;
|
||||
UINT8 Size;
|
||||
UINT8 Type;
|
||||
UINT8 Tag;
|
||||
HID_DATA Data;
|
||||
} HID_ITEM;
|
||||
|
||||
#define USB_MOUSE_DEV_FROM_MOUSE_PROTOCOL(a) \
|
||||
@@ -130,9 +129,9 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gUsbMouseComponentName2;
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
USBMouseDriverBindingSupported (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -157,9 +156,9 @@ USBMouseDriverBindingSupported (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
USBMouseDriverBindingStart (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -178,10 +177,10 @@ USBMouseDriverBindingStart (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
USBMouseDriverBindingStop (
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|
||||
IN EFI_HANDLE Controller,
|
||||
IN UINTN NumberOfChildren,
|
||||
IN EFI_HANDLE *ChildHandleBuffer
|
||||
);
|
||||
|
||||
//
|
||||
@@ -291,11 +290,11 @@ UsbMouseComponentNameGetDriverName (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UsbMouseComponentNameGetControllerName (
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
IN EFI_COMPONENT_NAME_PROTOCOL *This,
|
||||
IN EFI_HANDLE ControllerHandle,
|
||||
IN EFI_HANDLE ChildHandle OPTIONAL,
|
||||
IN CHAR8 *Language,
|
||||
OUT CHAR16 **ControllerName
|
||||
);
|
||||
|
||||
//
|
||||
@@ -337,8 +336,8 @@ GetMouseState (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
UsbMouseReset (
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
IN EFI_SIMPLE_POINTER_PROTOCOL *This,
|
||||
IN BOOLEAN ExtendedVerification
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -351,8 +350,8 @@ UsbMouseReset (
|
||||
VOID
|
||||
EFIAPI
|
||||
UsbMouseWaitForInput (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
);
|
||||
|
||||
//
|
||||
@@ -370,7 +369,7 @@ UsbMouseWaitForInput (
|
||||
**/
|
||||
BOOLEAN
|
||||
IsUsbMouse (
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo
|
||||
IN EFI_USB_IO_PROTOCOL *UsbIo
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -390,7 +389,7 @@ IsUsbMouse (
|
||||
**/
|
||||
EFI_STATUS
|
||||
InitializeUsbMouseDevice (
|
||||
IN OUT USB_MOUSE_DEV *UsbMouseDev
|
||||
IN OUT USB_MOUSE_DEV *UsbMouseDev
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -413,10 +412,10 @@ InitializeUsbMouseDevice (
|
||||
EFI_STATUS
|
||||
EFIAPI
|
||||
OnMouseInterruptComplete (
|
||||
IN VOID *Data,
|
||||
IN UINTN DataLength,
|
||||
IN VOID *Context,
|
||||
IN UINT32 Result
|
||||
IN VOID *Data,
|
||||
IN UINTN DataLength,
|
||||
IN VOID *Context,
|
||||
IN UINT32 Result
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -435,8 +434,8 @@ OnMouseInterruptComplete (
|
||||
VOID
|
||||
EFIAPI
|
||||
USBMouseRecoveryHandler (
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
IN EFI_EVENT Event,
|
||||
IN VOID *Context
|
||||
);
|
||||
|
||||
/**
|
||||
@@ -457,9 +456,9 @@ USBMouseRecoveryHandler (
|
||||
**/
|
||||
EFI_STATUS
|
||||
ParseMouseReportDescriptor (
|
||||
OUT USB_MOUSE_DEV *UsbMouse,
|
||||
IN UINT8 *ReportDescriptor,
|
||||
IN UINTN ReportSize
|
||||
OUT USB_MOUSE_DEV *UsbMouse,
|
||||
IN UINT8 *ReportDescriptor,
|
||||
IN UINTN ReportSize
|
||||
);
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user