2021-07-18 21:09:00 +03:00
|
|
|
#include "loader.h"
|
|
|
|
|
|
|
|
#include <furi.h>
|
2022-01-05 19:10:18 +03:00
|
|
|
#include <furi_hal.h>
|
2022-01-03 00:39:56 +03:00
|
|
|
#include <furi/pubsub.h>
|
2021-07-18 21:09:00 +03:00
|
|
|
#include <cli/cli.h>
|
2021-12-24 21:47:48 +03:00
|
|
|
#include <lib/toolbox/args.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;
|
2022-02-10 14:20:50 +03:00
|
|
|
|
|
|
|
const FlipperApplication* application;
|
|
|
|
FuriThread* application_thread;
|
|
|
|
char* application_arguments;
|
|
|
|
|
2021-07-18 21:09:00 +03:00
|
|
|
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;
|
2022-02-10 14:20:50 +03:00
|
|
|
volatile uint8_t lock_count;
|
2022-01-03 00:39:56 +03:00
|
|
|
|
|
|
|
FuriPubSub* pubsub;
|
2021-07-18 21:09:00 +03:00
|
|
|
};
|
2021-09-28 16:10:13 +03:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
LoaderMenuViewPrimary,
|
|
|
|
LoaderMenuViewPlugins,
|
|
|
|
LoaderMenuViewDebug,
|
|
|
|
LoaderMenuViewSettings,
|
|
|
|
} LoaderMenuView;
|