优化按钮消息循环,同时将按钮改为下降沿触发

Signed-off-by: kevin <kevin@lmve.net>
This commit is contained in:
2022-05-05 18:26:37 +08:00
parent e15506fa7e
commit 7d1c31262b
61 changed files with 1966 additions and 1970 deletions
+2 -3
View File
@@ -12,8 +12,7 @@ typedef struct button
uint8_t lock;
uint32_t time;
uint16_t times;
GPIO_TypeDef *GPIOx;
uint16_t GPIO_Pin;
uint8_t config_longtimes;
} button;
typedef struct
@@ -22,6 +21,6 @@ typedef struct
uint8_t move_flag:1;
} encoder;
void GEI_BUTTON_CODE(button *bt);
void GEI_BUTTON_CODE(button *bt,uint8_t flag);
int GET_ENCODE(encoder *e);
#endif /* ENCODER_H_ */