2021-07-18 18:09:00 +00:00
|
|
|
#include "loader.h"
|
|
|
|
|
|
|
|
#include <furi.h>
|
2021-08-08 18:03:25 +00:00
|
|
|
#include <furi-hal.h>
|
2021-07-18 18:09:00 +00:00
|
|
|
#include <cli/cli.h>
|
2021-09-28 13:10:13 +00:00
|
|
|
|
|
|
|
#include <gui/view_dispatcher.h>
|
|
|
|
|
|
|
|
#include <gui/modules/menu.h>
|
|
|
|
#include <gui/modules/submenu.h>
|
|
|
|
|
2021-07-18 18:09:00 +00:00
|
|
|
#include <applications.h>
|
|
|
|
#include <assets_icons.h>
|
|
|
|
|
|
|
|
#define LOADER_LOG_TAG "loader"
|
|
|
|
|
|
|
|
struct Loader {
|
2021-09-28 13:10:13 +00:00
|
|
|
osThreadId_t loader_thread;
|
2021-07-18 18:09:00 +00:00
|
|
|
FuriThread* thread;
|
|
|
|
const FlipperApplication* current_app;
|
|
|
|
string_t args;
|
|
|
|
Cli* cli;
|
2021-09-28 13:10:13 +00:00
|
|
|
Gui* gui;
|
|
|
|
|
|
|
|
ViewDispatcher* view_dispatcher;
|
|
|
|
Menu* primary_menu;
|
|
|
|
Submenu* plugins_menu;
|
|
|
|
Submenu* debug_menu;
|
|
|
|
Submenu* settings_menu;
|
|
|
|
|
2021-07-18 18:09:00 +00:00
|
|
|
size_t free_heap_size;
|
|
|
|
osMutexId_t mutex;
|
|
|
|
volatile uint8_t lock_semaphore;
|
|
|
|
};
|
2021-09-28 13:10:13 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
LoaderMenuViewPrimary,
|
|
|
|
LoaderMenuViewPlugins,
|
|
|
|
LoaderMenuViewDebug,
|
|
|
|
LoaderMenuViewSettings,
|
|
|
|
} LoaderMenuView;
|