📄 keypad.hpp
字号:
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//
// Use of this sample source code is subject to the terms of the Microsoft
// license agreement under which you licensed this sample source code. If
// you did not accept the terms of the license agreement, you are not
// authorized to use this sample source code. For the terms of the license,
// please see the license agreement between you and Microsoft or, if applicable,
// see the LICENSE.RTF on your install media or the root of your tools installation.
// THE SAMPLE SOURCE CODE IS PROVIDED "AS IS", WITH NO WARRANTIES.
//
/******************************************************************************
**
** Copyright 2000-2004 Intel Corporation All Rights Reserved.
**
** Portions of the source code contained or described herein and all documents
** related to such source code (Material) are owned by Intel Corporation
** or its suppliers or licensors and is licensed by Microsoft Corporation for distribution.
** Title to the Material remains with Intel Corporation or its suppliers and licensors.
** Use of the Materials is subject to the terms of the Microsoft license agreement which accompanied the Materials.
** No other license under any patent, copyright, trade secret or other intellectual
** property right is granted to or conferred upon you by disclosure or
** delivery of the Materials, either expressly, by implication, inducement,
** estoppel or otherwise
** Some portion of the Materials may be copyrighted by Microsoft Corporation.
**
** Module Name: keypad.hpp
**
** Abstract:
** This file defines some prototypes, typedefs and constants for the
** built-in keypad of an Intel(c) platform
**
/*****************************************************************************/
#ifndef __KEYPAD_HPP__
#define __KEYPAD_HPP__
#include <windows.h>
#define KEYPAD_PDD_ID 0x10
class KeyPad
{
HANDLE m_hevInterrupt;
public:
BOOL
Initialize(
void
);
BOOL
IsrThreadStart(
void
);
BOOL
IsrThreadProc(
void
);
BOOL
KeyPadPowerOff(
void
);
BOOL
KeyPadPowerOn(
void
);
#if 0 //ndef BSP_NOIPM
void IPM_KeyPadInit(void);
void IPM_RegisterKeyPadActivity(void);
#endif // ndef BSP_NOIPM
BOOL
KeyPadDataRead(
UINT8 *
);
private:
friend
void
KeyPadPdd_PowerHandler(
BOOL bOff
);
#if 0
// we don't have notification LEDs for the keypad
friend
void
WINAPI
KeypadPdd_ToggleKeyNotification(
KEY_STATE_FLAGS KeyStateFlags
);
#endif
};
// Two constants used for, possibly not defined in, xllp keypad module
#ifndef XLLP_KPD_INT_ENABLE
#define XLLP_KPD_INT_ENABLE 1
#define XLLP_KPD_INT_DISABLE 0
#endif //ndef XLLP_KPD_INT_ENABLE
#ifndef XLLP_SCAN_CODE_MAX
#define XLLP_SCAN_CODE_MAX 0xBF
#endif// ifndef XLLP_SCAN_CODE_MAX
#define UNIQUE_KEY_SC_RAW_MIN 0x80
#define UNIQUE_KEY_SC_RAW_MAX 0x8F
#define UNIQUE_KEY_SC_PREPEND_MSK 0x83500 // Something all our own
extern const UINT8 XllpScanCodeToWinCeScanCodeTable[XLLP_SCAN_CODE_MAX+1];
#endif // define __KEYPAD_HPP__
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -