![]() |
BSB Developer Docs
|
Bare minimum for internal CLI commands including redundant opaque types defined elsewhere. More...
Go to the source code of this file.
Typedefs | |
| typedef struct PipeSide | PipeSide |
| typedef struct FuriString | FuriString |
| typedef void(* | CliCommandExecuteCallback) (PipeSide *pipe, FuriString *args, void *context) |
| CLI command execution callback pointer. | |
Enumerations | |
| enum | CliCommandFlag { CliCommandFlagDefault = 0 , CliCommandFlagParallelUnsafe = (1 << 0) , CliCommandFlagInsomniaSafe = (1 << 1) , CliCommandFlagDontAttachStdio = (1 << 2) , CliCommandFlagUseShellThread , CliCommandFlagExclusive , CliCommandFlagExternal = (1 << 5) } |
Bare minimum for internal CLI commands including redundant opaque types defined elsewhere.
This file is needed for applications.h.
| typedef void(* CliCommandExecuteCallback) (PipeSide *pipe, FuriString *args, void *context) |
CLI command execution callback pointer.
This callback will be called from a separate thread spawned just for your command. The pipe will be installed as the thread's stdio, so you can use printf, getchar and other standard functions to communicate with the user.
| [in] | pipe | Pipe that can be used to send and receive data. If CliCommandFlagDontAttachStdio was not set, you can also use standard C functions (printf, getc, etc.) to access this pipe. |
| [in] | args | String with what was passed after the command |
| [in] | context | Whatever you provided to cli_add_command |
| enum CliCommandFlag |