7 INPUT_KEY_LEFT_PRESS
= 2,
8 INPUT_KEY_UP_PRESS
= 3,
9 INPUT_KEY_RIGHT_PRESS
= 4,
10 INPUT_KEY_DOWN_PRESS
= 5,
11 INPUT_KEY_OK_PRESS
= 6,
12 INPUT_KEY_NO_PRESS
= 7
15 // Number of values in JOY_ADC_VALUES, if defined
16 // These must be ADC readings for {UP, DOWN, LEFT, RIGHT, ENTER, IDLE}
17 constexpr size_t N_JOY_ADC_VALUES
= 6;
23 uint32_t keyDownStart
;
25 static uint16_t joyAdcValues
[N_JOY_ADC_VALUES
];
26 uint16_t fuzzValues
[N_JOY_ADC_VALUES
];
27 void calcFuzzValues();
34 void update(int *keyValue
, bool *keyLongPressed
);
36 static constexpr uint32_t KEY_DEBOUNCE_MS
= 25;
37 static constexpr uint32_t KEY_LONG_PRESS_MS
= 1000;