📄 key.h
字号:
/*""FILE COMMENT""*************************************************************
* System Name : RENESAS T-Engine, micro T-Engine series
* File Name : key.h
* Version : 1.00.00
* Contents : Key switch
* Model : T-Engine/Sh7727
* CPU : SH7727
* Compiler : GNU
* OS : T-Kernel
* note : The Software is being delivered to you "AS IS"
* : and Renesas,whether explicitly or implicitly makes
* : no warranty as to its Use or performance.
* : RENESAS AND ITS SUPPLIER DO NOT AND CANNOT WARRANT
* : THE PERFORMANCE OR RESULTS YOU MAY OBTAIN BY USING
* : THE SOFTWARE. AS TO ANY MATTER INCLUDING WITHOUT
* : LIMITATION NONINFRINGEMENT OF THIRD PARTY RIGHTS,
* : MERCHANTABILITY, INTEGRATION, SATISFACTORY QUALITY,
* : OR FITNESS FOR ANY PARTICULAR PURPOSE.
*
* Copyright (c) 2006 RENESAS TECHNOLOGY CORP. All Rights Reserved.
* AND RENESAS SOLUTIONS CORP. All Rights Reserved.
* history : 2006.07.28 ver1.00.00
*""FILE COMMENT END""*********************************************************/
#ifndef _KEY_H_
#define _KEY_H_
#include <tk/tkernel.h>
/* KEY Register */
#define KEYCR (0x60)
#define KATIMER (0x61)
#define KEYSR (0x62)
#define KBITPR (0x64)
/* key code */
#define sw1_1 0x0001
#define sw1_2 0x0002
#define sw1_3 0x0003
#define sw1_4 0x0004
#define sw1_5 0x0005
#define sw2 0x0006
#define sw3 0x0007
/* Auto Repeat Time */
#define KS_100MS 0x01
#define KS_150MS 0x02
#define KS_200MS 0x04
#define KS_250MS 0x08
#define KS_300MS 0x10
#define KS_350MS 0x20
#define KS_400MS 0x40
#define KS_450MS 0x80
/* KEYCNT REG bit*/
#define KEY_Cnt_STR 0x01
#define KEY_Cnt_ONI 0x02
#define KEY_Cnt_OFFI 0x04
#define KEY_Cnt_ARKEYI 0x08
#define KEY_Cnt_PONSWI 0x10
#define KEY_Cnt_NMIE 0x20
/* KEYSR REG bit*/
#define KEY_sr_ONF 0x02
#define KEY_sr_OFFF 0x04
#define KEY_sr_ARKEYF 0x08
#define KEY_sr_PONSWF 0x10
/* Last Key pattern */
UH last_keyptr;
typedef struct {
T_DEVEVT h;
UH keytop;
UH code; /* key map*/
// MetaBut stat;
} KeyEvt;
/* Message Buffer size */
#define DEF_BUFSZ sizeof(KeyEvt)*10
/* Max Message Buffer size */
#define DEF_MAXMSZ sizeof(KeyEvt)
/* inner functions */
IMPORT ID ks_init(void);
IMPORT UH ks_get_key(void);
IMPORT ER ks_chg_key(UH *onoff,UH *code,TMO tmout);
IMPORT void ks_ena_int(void);
IMPORT void ks_dis_int(void);
IMPORT ER ke_set_rtime(UB time);
IMPORT void ks_inthdr(UINT dintno);
IMPORT void h8_inthdr(UINT dintno);
#endif /* _KEY_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -