fix bug lenght timer

This commit is contained in:
2025-05-29 20:17:16 +02:00
parent cf3dcde4ff
commit 8a4bac8ee6
2 changed files with 5 additions and 5 deletions

View File

@@ -2,6 +2,8 @@
#include "input_handler.h"
#include "timer_counter.h"
typedef void (*ButtonRoutine_t)(ButtonKey_t *);
const ButtonRoutine_t button_routine[MAX_STATE];
void buttonHandler(ButtonKey_t *key)

View File

@@ -33,14 +33,12 @@ struct ButtonKey
GPIO_PinState active_state; // The state when the button is active (pressed)
uint8_t last_tick; // Last remembered time before steps
uint8_t timer_debounce_on; // Fixed, settable time for debounce timer
uint8_t timer_debounce_off; // Fixed, settable time for debounce timer
uint16_t last_tick; // Last remembered time before steps
uint16_t timer_debounce_on; // Fixed, settable time for debounce timer
uint16_t timer_debounce_off; // Fixed, settable time for debounce timer
buttonPressed_t buttonReleased; // A callback for button released
buttonPressed_t buttonPressed; // A callback for button pressed
};
typedef void (*ButtonRoutine_t)(ButtonKey_t *);
void buttonHandler(ButtonKey_t *key);