feat: 添加旋转编码器按键长短按功能
This commit is contained in:
@@ -89,6 +89,12 @@ void system_delay_us(uint32 num)
|
||||
}
|
||||
}
|
||||
|
||||
uint64_t system_get_tick(void)
|
||||
{
|
||||
uint64_t time_temp = SysTick->CNT;
|
||||
return (time_temp);
|
||||
}
|
||||
|
||||
void system_delay_init(void)
|
||||
{
|
||||
SysTick->CTLR |= 0x21;
|
||||
|
||||
@@ -39,8 +39,12 @@
|
||||
#include "zf_common_clock.h"
|
||||
#include "zf_common_typedef.h"
|
||||
|
||||
#define LONG_PRESS_THRESHOLD_MS (300ULL)
|
||||
#define LONG_PRESS_THRESHOLD_TICK (LONG_PRESS_THRESHOLD_MS * 18000ULL)
|
||||
|
||||
void system_delay_ms(uint32 time);
|
||||
void system_delay_us(uint32 time);
|
||||
uint64_t system_get_tick(void);
|
||||
void system_delay_init(void);
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user