[FL-938] Keyboard widget changes (#398)

* inputs: add repeat event
* byte_input: change draw
* text_input, byte_input: process repeat event
This commit is contained in:
gornekich
2021-04-01 20:10:12 +03:00
committed by GitHub
parent 37131dbe12
commit 78ff0c9fca
5 changed files with 30 additions and 16 deletions

View File

@@ -10,6 +10,7 @@
#define INPUT_DEBOUNCE_TICKS_HALF (INPUT_DEBOUNCE_TICKS / 2)
#define INPUT_LONG_PRESS_TICKS 2048
#define INPUT_REPEATE_PRESS_TICKS 256
#define INPUT_THREAD_FLAG_ISR 0x00000001
/* Input pin state */
@@ -17,6 +18,7 @@ typedef struct {
const InputPin* pin;
// State
volatile bool state;
volatile bool repeat_event;
volatile uint8_t debounce;
volatile osTimerId_t press_timer;
} InputPinState;