/** * @file cli_i.h * Internal API for getting commands registered with the CLI */ #pragma once #include #include #include "cli.h" #ifdef __cplusplus extern "C" { #endif #define CLI_BUILTIN_COMMAND_STACK_SIZE (3 * 1024U) typedef struct { void* context; // #define CLI_PLUGIN_APP_ID "cli" #define CLI_PLUGIN_API_VERSION 1 #define CLI_PLUGIN_WRAPPER(plugin_name_without_cli_suffix, cli_command_callback) \ void cli_command_callback##_wrapper(PipeSide* pipe, FuriString* args, void* context) { \ cli_plugin_wrapper(plugin_name_without_cli_suffix, pipe, args, context); \ } \ static const FlipperAppPluginDescriptor cli_command_callback##_plugin_descriptor = { \ .appid = CLI_PLUGIN_APP_ID, \ .ep_api_version = CLI_PLUGIN_API_VERSION, \ .entry_point = &cli_command_callback, \ }; \ const FlipperAppPluginDescriptor* cli_command_callback##_plugin_ep(void) { \ UNUSED(cli_command_callback##_wrapper); \ return &cli_command_callback##_plugin_descriptor; \ } #ifdef __cplusplus } #endif