123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- #ifndef _ReadKey_H
- #define _ReadKey_H
- #include <stdbool.h>
- #define baseTime 10
- typedef struct{
- bool enReleaseKey;
- bool enDoubleKey;
- bool enLongKey;
- bool enCyclicKey;
-
- bool stReleaseKey;
- bool stDoubleKey;
- bool stLongKey;
- bool stCyclicKey;
-
- bool isDown;
- unsigned int downTime;
- unsigned int upTime;
-
- unsigned char oldValue;
- unsigned char newValue;
-
- }KeyParam_ts;
- typedef struct{
- bool haveKey;
- unsigned char value;
- }KeyParamExt_ts;
- KeyParamExt_ts *KeyValueChange(unsigned char PreKeyValue);
- void EnableDoubleKey(void);
- bool getDoubleKeySt(void);
- void clearDoubleKey(void);
- void EnableLongKey(unsigned int Xms);
- bool getLongKeySt(void);
- void clearLongKey(void);
- void EnableCyclicKey(unsigned int Xms);
- bool getCyclicKeySt(void);
- void clearCyclicKey(void);
- void EnableReleaseKey(void);
- bool getReleaseKeySt(void);
- void clearReleaseKey(void);
- #endif
|