mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-12 18:08:36 -07:00
move part of the CLI to microsd to free up space for COMPACT 0 builds
CLI wrapper and idea by Willy-JL
This commit is contained in:
@@ -272,11 +272,20 @@ App(
|
||||
sources=["plugins/supported_cards/skylanders.c"],
|
||||
)
|
||||
|
||||
App(
|
||||
appid="nfc_cli",
|
||||
targets=["f7"],
|
||||
apptype=FlipperAppType.PLUGIN,
|
||||
entry_point="nfc_cli_plugin_ep",
|
||||
requires=["cli"],
|
||||
sources=["nfc_cli.c"],
|
||||
)
|
||||
|
||||
App(
|
||||
appid="nfc_start",
|
||||
targets=["f7"],
|
||||
apptype=FlipperAppType.STARTUP,
|
||||
entry_point="nfc_on_system_start",
|
||||
sources=["nfc_cli.c"],
|
||||
sources=["nfc_start.c"],
|
||||
order=30,
|
||||
)
|
||||
|
||||
@@ -63,12 +63,15 @@ static void nfc_cli(Cli* cli, FuriString* args, void* context) {
|
||||
furi_string_free(cmd);
|
||||
}
|
||||
|
||||
void nfc_on_system_start(void) {
|
||||
#ifdef SRV_CLI
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "nfc", CliCommandFlagDefault, nfc_cli, NULL);
|
||||
furi_record_close(RECORD_CLI);
|
||||
#else
|
||||
UNUSED(nfc_cli);
|
||||
#endif
|
||||
#include <flipper_application/flipper_application.h>
|
||||
#include <cli/cli_i.h>
|
||||
|
||||
static const FlipperAppPluginDescriptor plugin_descriptor = {
|
||||
.appid = CLI_PLUGIN_APP_ID,
|
||||
.ep_api_version = CLI_PLUGIN_API_VERSION,
|
||||
.entry_point = &nfc_cli,
|
||||
};
|
||||
|
||||
const FlipperAppPluginDescriptor* nfc_cli_plugin_ep(void) {
|
||||
return &plugin_descriptor;
|
||||
}
|
||||
|
||||
11
applications/main/nfc/nfc_start.c
Normal file
11
applications/main/nfc/nfc_start.c
Normal file
@@ -0,0 +1,11 @@
|
||||
#include <cli/cli_i.h>
|
||||
|
||||
static void nfc_cli_wrapper(Cli* cli, FuriString* args, void* context) {
|
||||
cli_plugin_wrapper("nfc", cli, args, context);
|
||||
}
|
||||
|
||||
void nfc_on_system_start(void) {
|
||||
Cli* cli = furi_record_open(RECORD_CLI);
|
||||
cli_add_command(cli, "nfc", CliCommandFlagDefault, nfc_cli_wrapper, NULL);
|
||||
furi_record_close(RECORD_CLI);
|
||||
}
|
||||
Reference in New Issue
Block a user