We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
您好,请问一下长按连发只会触发一次是什么原因,其他情况都试过没有问题
button_init(&button1, read_button_GPIO, GPIO_PIN_RESET, btn1_id); static PressEvent btn1_event_val; button_start(&button1); while (1) { /*轮询读取键值模式*/ if (btn1_event_val != get_button_event(&button1)) { btn1_event_val = get_button_event(&button1); switch (btn1_event_val) { case SINGLE_CLICK: HAL_GPIO_TogglePin(LED_B_GPIO_Port, LED_B_Pin); break; case DOUBLE_CLICK: HAL_GPIO_TogglePin(LED_G_GPIO_Port, LED_G_Pin); break; case LONG_PRESS_HOLD: Usart_SendString(&huart2, "KEY1 LONG REPEAT"); default: break; } } }
还有请问一下这几个值修改都是代表什么意思呢,谢谢
#define TICKS_INTERVAL 5 //ms #define DEBOUNCE_TICKS 3 //MAX 7 (0 ~ 7) #define SHORT_TICKS (300 /TICKS_INTERVAL) #define LONG_TICKS (1000 /TICKS_INTERVAL)
The text was updated successfully, but these errors were encountered:
No branches or pull requests
您好,请问一下长按连发只会触发一次是什么原因,其他情况都试过没有问题
还有请问一下这几个值修改都是代表什么意思呢,谢谢
The text was updated successfully, but these errors were encountered: