📄 key.h
字号:
/*
*********************************************************************************************************
* Shanghai Maritime University
* Pudong Avenue 1550#
*
* (c)Copyright 2005,SMSC,Shanghai,China
* All Rights Reserved
*
*
* Filename : Key.h
* Programmer : Jason Chen (Refer to Jean J. Labrosse's Matrix keyboard driver)
*********************************************************************************************************
* USER DEFINED CONSTANTS
*
* Note: These #defines would normally reside in your application specific code.
*********************************************************************************************************
*/
#ifndef KEY_H
#define KEY_H
//#include "Data_types.h"
//#include "includes.h"
//#define KEY_BUF_SIZE 10 /* Size of the KEYBOARD buffer */
//#define KEY_PORT_VAL port8001 /* The port address of the keyboard interface */
//#define KEY_PORT_MAX_BITS 16 /* The maximum bits of the keyboard interface */
//#define KEY_RPT_DLY 2 /* Number of scan times before auto repeat executes again */
//#define KEY_RPT_START_DLY 10 /* Number of scan times before auto repeat function engages*/
//#define KEY_SCAN_TASK_DLY 50 /* Number of milliseconds between keyboard scans */
//#define KEY_SCAN_TASK_PRIO 10 /* Set priority of keyboard scan task */
//#define KEY_SCAN_TASK_STK_SIZE 1024 /* Size of keyboard scan task stack */
/*
*********************************************************************************************************
* FUNCTION PROTOTYPES
*********************************************************************************************************
*/
void KeyFlush(void); /* Flush the keyboard buffer */
INT8U KeyGetKey(INT16U to); /* Get a key scan code from driver if one is present, -1 else */
INT32U KeyGetKeyDownTime(void); /* Get how long key has been pressed (in milliseconds) */
BOOLEAN KeyHit(void); /* See if a key has been pressed (TRUE if so, FALSE if not) */
void KeyInit(void); /* Initialize the keyboard handler */
void KeyScanTask(void);
void KeyInitPort(void); /* Initialize I/O ports */
INT16U KeyGetPort(void); /* Read COLUMNs */
#endif /*End of HEY_H */
/*
*********************************************************************************************************
* End of file
*********************************************************************************************************
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -