b9a766d909
* Added support for running applications from SD card (FAPs - Flipper Application Packages) * Added plugin_dist target for fbt to build FAPs * All apps of type FlipperAppType.EXTERNAL and FlipperAppType.PLUGIN are built as FAPs by default * Updated VSCode configuration for new fbt features - re-deploy stock configuration to use them * Added debugging support for FAPs with fbt debug & VSCode * Added public firmware API with automated versioning Co-authored-by: hedger <hedger@users.noreply.github.com> Co-authored-by: SG <who.just.the.doctor@gmail.com> Co-authored-by: あく <alleteam@gmail.com>
50 lines
1.2 KiB
C
50 lines
1.2 KiB
C
#pragma once
|
|
|
|
#include "desktop_settings_filename.h"
|
|
|
|
#include <furi_hal.h>
|
|
#include <stdint.h>
|
|
#include <stdbool.h>
|
|
#include <toolbox/saved_struct.h>
|
|
#include <storage/storage.h>
|
|
|
|
#define DESKTOP_SETTINGS_VER (4)
|
|
|
|
#define DESKTOP_SETTINGS_PATH INT_PATH(DESKTOP_SETTINGS_FILE_NAME)
|
|
#define DESKTOP_SETTINGS_MAGIC (0x17)
|
|
#define PIN_MAX_LENGTH 12
|
|
|
|
#define DESKTOP_SETTINGS_RUN_PIN_SETUP_ARG "run_pin_setup"
|
|
|
|
#define SAVE_DESKTOP_SETTINGS(x) \
|
|
saved_struct_save( \
|
|
DESKTOP_SETTINGS_PATH, \
|
|
(x), \
|
|
sizeof(DesktopSettings), \
|
|
DESKTOP_SETTINGS_MAGIC, \
|
|
DESKTOP_SETTINGS_VER)
|
|
|
|
#define LOAD_DESKTOP_SETTINGS(x) \
|
|
saved_struct_load( \
|
|
DESKTOP_SETTINGS_PATH, \
|
|
(x), \
|
|
sizeof(DesktopSettings), \
|
|
DESKTOP_SETTINGS_MAGIC, \
|
|
DESKTOP_SETTINGS_VER)
|
|
|
|
#define MAX_PIN_SIZE 10
|
|
#define MIN_PIN_SIZE 4
|
|
|
|
typedef struct {
|
|
InputKey data[MAX_PIN_SIZE];
|
|
uint8_t length;
|
|
} PinCode;
|
|
|
|
typedef struct {
|
|
uint16_t favorite_primary;
|
|
uint16_t favorite_secondary;
|
|
PinCode pin_code;
|
|
uint8_t is_locked;
|
|
uint32_t auto_lock_delay_ms;
|
|
} DesktopSettings;
|