mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-12-24 11:43:09 +00:00
8b94eff7f9
Update input usage across project. Minor queue usage fixes and tick timings. (#330)
19 lines
608 B
C
19 lines
608 B
C
#pragma once
|
|
|
|
#include <api-hal-resources.h>
|
|
|
|
/* Input Types
|
|
* Some of them are physical events and some logical
|
|
*/
|
|
typedef enum {
|
|
InputTypePress, /* Press event, emitted after debounce */
|
|
InputTypeRelease, /* Release event, emitted after debounce */
|
|
InputTypeShort, /* Short event, emitted after InputTypeRelease done withing INPUT_LONG_PRESS interval */
|
|
InputTypeLong, /* Long event, emmited after INPUT_LONG_PRESS interval, asynchronouse to InputTypeRelease */
|
|
} InputType;
|
|
|
|
/* Input Event, dispatches with PubSub */
|
|
typedef struct {
|
|
InputKey key;
|
|
InputType type;
|
|
} InputEvent;
|