BSB Developer Docs
Loading...
Searching...
No Matches
firmware_applications_u5/applications.h
1#pragma once
2
3#include <stdlib.h>
4#include <stdint.h>
6
7#ifndef COUNT_OF
8#define COUNT_OF(x) (sizeof(x) / sizeof(x[0]))
9#endif
10
11typedef int32_t (*FuriThreadCallback)(void* context);
12
13typedef enum {
14 FlipperInternalApplicationFlagDefault = 0,
15 FlipperInternalApplicationFlagInsomniaSafe = (1 << 0),
16} FlipperInternalApplicationFlag;
17
18typedef struct {
19 const FuriThreadCallback app;
20 const char* name;
21 const char* appid;
22 const size_t stack_size;
23 const FlipperInternalApplicationFlag flags;
25
26typedef struct {
27 const char* name;
28 const char* path;
30
31typedef struct {
32 void (*const callback)(void);
33 const size_t stack_size;
35
36typedef struct {
37 const CliCommandExecuteCallback callback;
38 const char* name;
39 const size_t stack_size;
40 const CliCommandFlag flags;
42
43extern const char* FLIPPER_AUTORUN_APP_NAME;
44
45/* Services list
46 * Spawned on startup
47 */
48extern const FlipperInternalApplication FLIPPER_SERVICES[];
49extern const size_t FLIPPER_SERVICES_COUNT;
50
51/* Apps list
52 * Spawned by loader
53 */
54extern const FlipperInternalApplication FLIPPER_APPS[];
55extern const size_t FLIPPER_APPS_COUNT;
56
57/* On system start hooks
58 * Spawned by loader in separate threads right after OS initialization is complete
59 */
60extern const FlipperInternalOnStartHook FLIPPER_ON_SYSTEM_START[];
61extern const size_t FLIPPER_ON_SYSTEM_START_COUNT;
62
63/* System apps
64 * Can only be spawned by loader by name
65 */
66extern const FlipperInternalApplication FLIPPER_SYSTEM_APPS[];
67extern const size_t FLIPPER_SYSTEM_APPS_COUNT;
68
69/* Debug apps
70 * Can only be spawned by loader by name
71 */
72extern const FlipperInternalApplication FLIPPER_DEBUG_APPS[];
73extern const size_t FLIPPER_DEBUG_APPS_COUNT;
74
75extern const FlipperInternalApplication FLIPPER_ARCHIVE;
76
77/* Settings list
78 * Spawned by loader
79 */
80extern const FlipperInternalApplication FLIPPER_SETTINGS_APPS[];
81extern const size_t FLIPPER_SETTINGS_APPS_COUNT;
82
83/* External Menu Apps list
84 * Spawned by loader
85 */
86extern const FlipperExternalApplication FLIPPER_EXTERNAL_APPS[];
87extern const size_t FLIPPER_EXTERNAL_APPS_COUNT;
88
89/* Internal CLI commands
90 * Added to main CLI registry by CLI startup hook
91 */
92extern const FlipperInternalCommandApplication FLIPPER_CLI_COMMANDS[];
93extern const size_t FLIPPER_CLI_COMMANDS_COUNT;
Bare minimum for internal CLI commands including redundant opaque types defined elsewhere.
CliCommandFlag
Definition cli_command_min.h:13
void(* CliCommandExecuteCallback)(PipeSide *pipe, FuriString *args, void *context)
CLI command execution callback pointer.
Definition cli_command_min.h:48
Definition firmware_applications_si917/applications.h:20
Definition firmware_applications_si917/applications.h:13
Definition firmware_applications_si917/applications.h:30
Definition firmware_applications_si917/applications.h:25