📄 kbd_task.h
字号:
/*H**************************************************************************
* NAME: kbd_task.h
*----------------------------------------------------------------------------
* Copyright (c) 2002 Atmel.
*----------------------------------------------------------------------------
* RELEASE: snd1c-demo-df-sd-3_0_0
* REVISION: 1.5
*----------------------------------------------------------------------------
* PURPOSE:
* This file contains the Keyboard task definition
*****************************************************************************/
#ifndef _KBD_TASK_H_
#define _KBD_TASK_H_
/*_____ I N C L U D E S ____________________________________________________*/
/*_____ M A C R O S ________________________________________________________*/
#define KBD_DEBOUNCE_TEMPO 70/SCHEDULER_TICK /* debounce period: 70 ms */
#define KBD_DEBOUNCE_INIT 0 /* debounce counter init */
#define KBD_REP_START_TEMPO 500/SCHEDULER_TICK /* start period: 500 ms */
#define KBD_REP_START_INIT 0 /* repeat counter init */
#define KBD_REP_CONT_TEMPO 120/SCHEDULER_TICK /* repeat period: 120 ms */
#define KBD_REP_CONT_INIT 0 /* repeat_count init */
#define KBD_REP_LONG_TEMPO 3000/KBD_REP_CONT_TEMPO /* long repeat period: 3 s */
/*----- Task states -----*/
#define KBD_LOCK (Byte)0x00
#define KBD_IDLE (Byte)0x01
#define KBD_DEBOUNCE (Byte)0x02
#define KBD_DECODE (Byte)0x03
#define KBD_REP_START (Byte)0x04
#define KBD_REP_CONT (Byte)0x05
#define KBD_REP_LONG (Byte)(KBD_REP_LONG_TEMPO + KBD_REP_CONT)
/*_____ D E F I N I T I O N ________________________________________________*/
/*_____ D E C L A R A T I O N ______________________________________________*/
void kbd_task_init (void);
void kbd_task (void);
void kbd_set_stop (void);
void kbd_stop_repeat(void);
#endif /* _KBD_TASK_H_ */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -