mirror of
https://github.com/CloverHackyColor/CloverBootloader.git
synced 2024-12-10 14:23:31 +01:00
f35acfa5ab
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
108 lines
1.9 KiB
C
108 lines
1.9 KiB
C
/** @file
|
|
Header file for AmiEfiKeycode to KeyMapDb translator.
|
|
|
|
Copyright (c) 2018, vit9696. All rights reserved.<BR>
|
|
This program and the accompanying materials
|
|
are licensed and made available under the terms and conditions of the BSD License
|
|
which accompanies this distribution. The full text of the license may be found at
|
|
http://opensource.org/licenses/bsd-license.php
|
|
|
|
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
|
|
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
|
|
|
|
**/
|
|
#ifndef AIK_SELF_H
|
|
#define AIK_SELF_H
|
|
|
|
#include "AIKData.h"
|
|
#include "AIKSource.h"
|
|
#include "AIKTarget.h"
|
|
#include "AIKTranslate.h"
|
|
|
|
#include <Library/UefiLib.h>
|
|
|
|
//
|
|
// Maximum amount of keys polled at once
|
|
//
|
|
#define AIK_KEY_POLL_LIMIT (AIK_TARGET_BUFFER_SIZE)
|
|
|
|
//
|
|
// Defines key polling frequency
|
|
//
|
|
#define AIK_KEY_POLL_INTERVAL EFI_TIMER_PERIOD_MILLISECONDS(10)
|
|
|
|
typedef struct {
|
|
//
|
|
// Input sources
|
|
//
|
|
AIK_SOURCE Source;
|
|
|
|
//
|
|
// Output targets
|
|
//
|
|
AIK_TARGET Target;
|
|
|
|
//
|
|
// Key data
|
|
//
|
|
AIK_DATA Data;
|
|
|
|
//
|
|
// AppleKeyMapAggregator polling event
|
|
//
|
|
EFI_EVENT KeyMapDbArriveEvent;
|
|
|
|
//
|
|
// Keyboard input polling event
|
|
//
|
|
EFI_EVENT PollKeyboardEvent;
|
|
|
|
//
|
|
// Indicates keyboard input polling event to avoid reentrancy if any
|
|
//
|
|
BOOLEAN InPollKeyboardEvent;
|
|
|
|
//
|
|
// Indicates we are done for any event in case it gets fired.
|
|
// Not really needed, put in case of bogus firmwares.
|
|
//
|
|
BOOLEAN OurJobIsDone;
|
|
} AIK_SELF;
|
|
|
|
//
|
|
// This is only used in Shims, where no other way exists.
|
|
//
|
|
extern AIK_SELF gAikSelf;
|
|
|
|
EFI_STATUS
|
|
AIKProtocolArriveInstall (
|
|
AIK_SELF *Keycode
|
|
);
|
|
|
|
VOID
|
|
AIKProtocolArriveUninstall (
|
|
AIK_SELF *Keycode
|
|
);
|
|
|
|
EFI_STATUS
|
|
AIKInstall (
|
|
AIK_SELF *Keycode
|
|
);
|
|
|
|
VOID
|
|
AIKUninstall (
|
|
AIK_SELF *Keycode
|
|
);
|
|
|
|
EFI_STATUS
|
|
AIKInit (
|
|
VOID
|
|
);
|
|
|
|
EFI_STATUS
|
|
AIKExit (
|
|
VOID
|
|
);
|
|
|
|
#endif
|