mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-30 16:29:12 +00:00
056446dfed
* storage: added global #defines for /int, /ext & /any * storage: introduced PATH_EXT, PATH_INT& PATH_ANY macros * core apps: moved hardcoded config files names to separate headers; prefixed them with "."; updater: added file name migration to new naming convention on backup extraction * storage: fixed storage_merge_recursive handling of complex directory structures; storage_move_to_sd: changed data migration logic to all non-dot files & all folders * core: added macro aliases for core record names * Bumped protobuf commit pointer * storage: reserved 5 pages in /int; denying write&creation of non-dot files when running out of free space Co-authored-by: あく <alleteam@gmail.com>
40 lines
1.1 KiB
C
40 lines
1.1 KiB
C
/**
|
|
* @file input.h
|
|
* Input: main API
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <furi_hal_resources.h>
|
|
|
|
#define RECORD_INPUT_EVENTS "input_events"
|
|
|
|
/** 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 */
|
|
InputTypeRepeat, /**< Repeat event, emmited with INPUT_REPEATE_PRESS period after InputTypeLong event */
|
|
} InputType;
|
|
|
|
/** Input Event, dispatches with FuriPubSub */
|
|
typedef struct {
|
|
uint32_t sequence;
|
|
InputKey key;
|
|
InputType type;
|
|
} InputEvent;
|
|
|
|
/** Get human readable input key name
|
|
* @param key - InputKey
|
|
* @return string
|
|
*/
|
|
const char* input_get_key_name(InputKey key);
|
|
|
|
/** Get human readable input type name
|
|
* @param type - InputType
|
|
* @return string
|
|
*/
|
|
const char* input_get_type_name(InputType type);
|