unleashed-firmware/applications/loader/loader.h
あく e3c7201a20
Furi: core refactoring and CMSIS removal part 2 (#1410)
* Furi: rename and move core
* Furi: drop CMSIS_OS header and unused api, partially refactor and cleanup the rest
* Furi: CMSIS_OS drop and refactoring.
* Furi: refactoring, remove cmsis legacy
* Furi: fix incorrect assert on queue deallocation, cleanup timer
* Furi: improve delay api, get rid of floats
* hal: dropped furi_hal_crc
* Furi: move DWT based delay to cortex HAL
* Furi: update core documentation

Co-authored-by: hedger <hedger@nanode.su>
2022-07-20 13:56:33 +03:00

49 lines
1 KiB
C

#pragma once
#include <core/pubsub.h>
#include <stdbool.h>
typedef struct Loader Loader;
typedef enum {
LoaderStatusOk,
LoaderStatusErrorAppStarted,
LoaderStatusErrorUnknownApp,
LoaderStatusErrorInternal,
} LoaderStatus;
typedef enum {
LoaderEventTypeApplicationStarted,
LoaderEventTypeApplicationStopped
} LoaderEventType;
typedef struct {
LoaderEventType type;
} LoaderEvent;
/** Start application
* @param name - application name
* @param args - application arguments
* @retval true on success
*/
LoaderStatus loader_start(Loader* instance, const char* name, const char* args);
/** Lock application start
* @retval true on success
*/
bool loader_lock(Loader* instance);
/** Unlock application start */
void loader_unlock(Loader* instance);
/** Get loader lock status */
bool loader_is_locked(Loader* instance);
/** Show primary loader */
void loader_show_menu();
/** Show primary loader */
void loader_update_menu();
/** Show primary loader */
FuriPubSub* loader_get_pubsub(Loader* instance);