generated from sonic011gamer/edk2-msm8909
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add buttons (not functional for now)
- Loading branch information
1 parent
e1af5b9
commit 2330689
Showing
22 changed files
with
2,824 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
56 changes: 56 additions & 0 deletions
56
MSM8909Pkg/Drivers/GenericKeypadDeviceDxe/GenericKeypadDevice.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#include <PiDxe.h> | ||
#include <Protocol/KeypadDevice.h> | ||
#include <Library/DebugLib.h> | ||
#include <Library/KeypadDeviceImplLib.h> | ||
#include <Library/UefiBootServicesTableLib.h> | ||
|
||
typedef struct { | ||
VENDOR_DEVICE_PATH Keypad; | ||
EFI_DEVICE_PATH End; | ||
} KEYPAD_DEVICE_PATH; | ||
|
||
KEYPAD_DEVICE_PATH mInternalDevicePath = { | ||
{ | ||
{ | ||
HARDWARE_DEVICE_PATH, | ||
HW_VENDOR_DP, | ||
{ | ||
(UINT8)(sizeof(VENDOR_DEVICE_PATH)), | ||
(UINT8)((sizeof(VENDOR_DEVICE_PATH)) >> 8), | ||
}, | ||
}, | ||
EFI_CALLER_ID_GUID, | ||
}, | ||
{ | ||
END_DEVICE_PATH_TYPE, | ||
END_ENTIRE_DEVICE_PATH_SUBTYPE, | ||
{ sizeof (EFI_DEVICE_PATH_PROTOCOL), 0 } | ||
} | ||
}; | ||
|
||
STATIC KEYPAD_DEVICE_PROTOCOL mInternalKeypadDevice = { | ||
KeypadDeviceImplReset, | ||
KeypadDeviceImplGetKeys, | ||
}; | ||
|
||
EFI_STATUS | ||
EFIAPI | ||
KeypadDeviceDxeInitialize ( | ||
IN EFI_HANDLE ImageHandle, | ||
IN EFI_SYSTEM_TABLE *SystemTable | ||
) | ||
{ | ||
EFI_STATUS Status; | ||
|
||
Status = gBS->InstallMultipleProtocolInterfaces( | ||
&ImageHandle, | ||
&gSc8830KeypadDeviceProtocolGuid, | ||
&mInternalKeypadDevice, | ||
&gEfiDevicePathProtocolGuid, | ||
&mInternalDevicePath, | ||
NULL | ||
); | ||
ASSERT_EFI_ERROR(Status); | ||
|
||
return Status; | ||
} |
29 changes: 29 additions & 0 deletions
29
MSM8909Pkg/Drivers/GenericKeypadDeviceDxe/GenericKeypadDeviceDxe.inf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
[Defines] | ||
INF_VERSION = 0x00010005 | ||
BASE_NAME = GenericKeypadDeviceDxe | ||
FILE_GUID = 39A24CF8-411E-48EB-8BEA-3ED07327F400 | ||
MODULE_TYPE = DXE_DRIVER | ||
VERSION_STRING = 1.0 | ||
|
||
ENTRY_POINT = KeypadDeviceDxeInitialize | ||
|
||
[Sources.common] | ||
GenericKeypadDevice.c | ||
|
||
[Packages] | ||
MdePkg/MdePkg.dec | ||
ArmPkg/ArmPkg.dec | ||
EmbeddedPkg/EmbeddedPkg.dec | ||
MSM8909Pkg/MSM8909Pkg.dec | ||
|
||
[LibraryClasses] | ||
UefiDriverEntryPoint | ||
MemoryAllocationLib | ||
KeypadDeviceImplLib | ||
|
||
[Protocols] | ||
gSc8830KeypadDeviceProtocolGuid | ||
gEfiDevicePathProtocolGuid | ||
|
||
[Depex] | ||
TRUE |
Oops, something went wrong.