Fix button module and adjust long keypress time to a sane value

This commit is contained in:
2020-04-27 20:18:12 +02:00
parent eb3b0eb459
commit 3834bd404c
2 changed files with 9 additions and 4 deletions

View File

@@ -25,8 +25,8 @@
#define BUTTON_RCC_MASK RCC_AHB1ENR_GPIODEN
#define BUTTON_PIN 4
#define BUTTON_SHORT_ON_TIME_MS 50
#define BUTTON_LONG_ON_TIME_MS 800
#define BUTTON_SHORT_ON_TIME_MS 50UL
#define BUTTON_LONG_ON_TIME_MS 400UL
enum button_state {BUTTON_IDLE = 0, BUTTON_SHORT_RELEASED, BUTTON_LONG_RELEASED, BUTTON_SHORT, BUTTON_LONG};