⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 overview.d

📁 三星2410的BSP开发包
💻 D
字号:
// Copyright (c) 1995-2000 Microsoft Corporation.  All rights reserved.
//      @doc    EXTERNAL DRIVERS
/*      @topic Keyboard Driver |

The keyboard driver is responsible for converting input from the keyboard 
hardware into keyboard events which are fed into the input system and for 
generating the proper characters from these keyboard events.  

In the case of the keyboard driver, the interface between the MDD and PDD 
is not strictly fixed.  The sample code shows a design which works for the 
standard Windows CE keyboard layout.  By replacing the PDD layer, drivers 
have been implemented for hardware which uses software scanning, hardware 
scanning and a dedicated keyboard controller.  More exotic hardware or 
nonstandard keyboard layouts may require modification of both the MDD and 
PDD layers of the driver.  

The interface between the MDD and the user input system is fixed.  All 
keyboard drivers must implement this interface.  The following is an overview
of keyboard driver operation.

When the input system starts, it looks up the name of the keyboard driver 
DLL from the registry from HARDWARE\\DEVICEMAP\\KEYBD\\DriverName.  If no 
entry is found, the default name, keybddr.dll, is used.  It then loads the 
DLL and verifies that all required entry points exist.  The following is a 
list of all required keyboard driver entry points:<nl> 

	<tab><l KeybdDriverInitialize.KeybdDriverInitialize><nl>
	<tab><l KeybdDriverGetInfo.KeybdDriverGetInfo><nl>
	<tab><l KeybdDriverSetMode.KeybdDriverSetMode><nl>
	<tab><l KeybdDriverInitStates.KeybdDriverInitStates><nl>
	<tab><l KeybdDriverVKeyToUnicode.KeybdDriverVKeyToUnicode><nl>
	<tab><l KeybdDriverPowerHandler.KeybdDriverPowerHandler><nl>
	<tab><l KeybdPdd_GetEvent.KeybdPdd_GetEvent><nl>
	<tab><l KeybdPdd_PowerHandler.KeybdPdd_PowerHandler><nl>
	<tab><l KeybdPdd_InitializeDriver.KeybdPdd_InitializeDriver><nl>
	<tab><l KeybdPdd_DllEntry.KeybdPdd_DllEntry><nl>

The input system then calls <l KeybdDriverInitialize.KeybdDriverInitialize>
to do one time initializations.  In this function, the MDD saves a local
copy of the input system callback function and calls
<l KeybdPdd_InitializeDriver.KeybdPdd_InitializeDriver>. It then starts the 
keyboard driver interrupt service thread, <f KeybdDriverThread>, 
and returns to the input system.

In the sample MDD, the keyboard driver interrupt service thread is named 
<f KeybdDriverThread>.  This thread starts and does some initialization, 
calls <l InterruptInitialize.InterruptInitialize> with SYSINTR_KEYBOARD, 
and then waits for SYSINTR_KEYBOARD to be signalled.

When SYSINTR_KEYBOARD is signalled, the driver thread wakes up and calls 
<l KeybdPdd_GetEvent.KeybdPdd_GetEvent>.  The key events returned from 
the PDD are sent to the input system where they are queued up for distribution 
by the main input distribution thread.  

When the main input distribution thread pulls the keyboard event from the 
queue, it calls back in to the driver via 
<l KeybdDriverVKeyToUnicode.KeybdDriverVKeyToUnicode>.  
The driver looks at the given key event and the virtual key state and 
generates the corresponding characters.  The input thread then sends the 
virtual key and the characters to the appropriate application.

<l KeybdDriverGetInfo.KeybdDriverGetInfo> and 
<l KeybdDriverSetMode.KeybdDriverSetMode> are used to get and set
information about the keyboard.

When a keyboard connection event is processed by the main input thread, 
the thread calls <l KeybdDriverGetInfo.KeybdDriverGetInfo> to get the 
VKey to Unicode information supplied by the driver.  It allocates the 
required memory for the virtual key state data and any extra data required 
by the driver.  It then calls <l KeybdDriverInitStates.KeybdDriverInitStates> 
to initialize the memory.
*/

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -