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