feat: 添加旋转编码器按键长短按功能

This commit is contained in:
2024-01-05 15:55:17 +08:00
parent b4b265cdef
commit 535cb372df
8 changed files with 75 additions and 38 deletions

View File

@@ -3,9 +3,15 @@
#include "stdio.h"
#include "ch32v30x.h"
#define ROTATE_BUTTON_PRESS 1
#define ROTATE_BUTTON_FORWARD 2
#define ROTATE_BUTTON_BACKWARD 3
// #define rotate_button_press_short 1
// #define rotate_button_forward 2
// #define rotate_button_backward 3
typedef enum rotate_button_event{
rotate_button_press_short = 1,
rotate_button_press_long = 2,
rotate_button_forward = 3,
rotate_button_backward = 4,
}rotate_button_event;
extern uint8_t rotate_button;