📄 kbdist.cpp
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this source code is subject to the terms of the Microsoft end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to use
// this source code. For a copy of the EULA, please see the LICENSE.RTF on your
// install media.
//
/* -*-C-*-
*
* @module kbdist.cpp
*
* This file implements the interrupt service thread part of the platform
* independent code of the keyboard driver. This is provided as a sample
* to platform driver writers and is expected to be able to be used without
* major modification on most hardware platforms.
*
* THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
* ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
* THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
* PARTICULAR PURPOSE.
*
* Release Status:OS005-SW-70002-r0p0-00REL0
* $Copyright:
* ----------------------------------------------------------------
* This confidential and proprietary software may be used only as
* authorised by a licensing agreement from ARM Limited
* (C) COPYRIGHT 2004 ARM Limited
* ALL RIGHTS RESERVED
* The entire notice above must be reproduced on all authorised
* copies and copies may only be made to the extent permitted
* by a licensing agreement from ARM Limited.
* ----------------------------------------------------------------
* File: kbdist.cpp,v
* Revision: 1.1
* ----------------------------------------------------------------
* $
*/
#include <windows.h>
#include <keybdpdd.h>
#include <laymgr.h>
#include "pl050keybd.hpp"
extern PFN_KEYBD_EVENT v_pfnKeybdEvent;
extern UINT v_uiPddId;
unsigned int KbdISRUpcall(bool timedout, unsigned int scancode)
{
DEBUGCHK(v_pfnKeybdEvent != NULL);
UINT32 rguiScanCode[16];
BOOL rgfKeyUp[16];
UINT cEvents;
UINT uiEvent;
if (timedout) {
goto leave;
}
cEvents = pl050KeybdPdd_GetEventEx2(rguiScanCode, rgfKeyUp, scancode);
for (uiEvent = 0; uiEvent < cEvents; ++uiEvent)
{
(*v_pfnKeybdEvent)(v_uiPddId,
rguiScanCode[uiEvent], rgfKeyUp[uiEvent]);
}
leave:
// Since we don't handle auto-repeat here anymore, just return INFINITE.
return INFINITE;
}
/* EOF kbdist.cpp */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -