AT91SAM9263 WINCE 6.0 R2驱动开发-6X6矩阵键盘驱动

时间:2021-06-28 00:34:52

1.原理图

AT91SAM9263 WINCE 6.0 R2驱动开发-6X6矩阵键盘驱动

2.代码

3.sources文件

RELEASETYPE=PLATFORM
TARGETNAME=MATRIXKEY
TARGETTYPE=DYNLINK
DLLENTRY=DllMain

SOURCES= /
    matrixkey.cpp   /

TARGETLIBS= /
    $(_COMMONSDKROOT)/lib/$(_CPUINDPATH)/coredll.lib /

SOURCELIBS= /
 $(_TARGETPLATROOT)/lib/$(_CPUDEPPATH)/gpio.lib /


INCLUDES= $(_TARGETPLATROOT)/SRC/inc;$(_COMMONOAKROOT)/inc;$(INCLUDES)

4.注册表

[HKEY_LOCAL_MACHINE/Drivers/BuiltIn/matrixkey]
    "Prefix"="KEY"
    "Index"=dword:1
    "Dll"="MATRIXKEY.dll"
    "Order"=dword:12

5.platform.bib文件加入:

IF BSP_MATRIX
MATRIXKEY.dll   $(_FLATRELEASEDIR)/MATRIXKEY.dll  NK  SHK
ENDIF BSP_MATRIX

6.platform.reg文件加入

; -----------------------------------------------------------------------------
IF BSP_MATRIX
#include "$(_TARGETPLATROOT)/SRC/DRIVERS/MATRIXKEY/MATRIXKEY.reg"
ENDIF BSP_MATRIX
; -----------------------------------------------------------------------------

7注意:这里我做的按键是A-Z以及0-9共36个按键。

 

; -----------------------------------------------------------------------------
QQ:229425962

Phone:15820435302

Email:sky-liu@hotmail.com
; -----------------------------------------------------------------------------