This repository has been archived on 2024-12-31. You can view files and clone it, but cannot push or open issues or pull requests.
mfps/App/Inc/key.h

14 lines
495 B
C
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#ifndef _KEY_H
#define _KEY_H
void Key_Init(void);
void Key_Scan(void);
extern int Key_State[3]; // 使用一个三维数组描述K1-K3的状态1为按下0为抬起[1 0 0]->[K1按下 K2抬起 K3抬起]
extern int Key_Mode[3]; // 模式0按住执行抬起停止
// 模式1只要按下就执行不考虑抬起
// 模式2完成按下+抬起)的动作才执行。
// K1, K2, K3三者模式独立
#endif