14 CliSymbolAsciiSOH = 0x01,
15 CliSymbolAsciiETX = 0x03,
16 CliSymbolAsciiEOT = 0x04,
17 CliSymbolAsciiBell = 0x07,
18 CliSymbolAsciiBackspace = 0x08,
19 CliSymbolAsciiTab = 0x09,
20 CliSymbolAsciiLF = 0x0A,
21 CliSymbolAsciiCR = 0x0D,
22 CliSymbolAsciiEsc = 0x1B,
23 CliSymbolAsciiUS = 0x1F,
24 CliSymbolAsciiSpace = 0x20,
25 CliSymbolAsciiDel = 0x7F,
35#define RECORD_CLI "cli"
68void cli_print_usage(
const char* cmd,
const char* usage,
const char* arg);
85size_t cli_read(
Cli* cli, uint8_t* buffer,
size_t size);
112void cli_write(
Cli* cli,
const uint8_t* buffer,
size_t size);
126void cli_session_open(
Cli* cli,
void* session);
128void cli_session_close(
Cli* cli);
130bool cli_is_connected(
Cli* cli);
void cli_print_usage(const char *cmd, const char *usage, const char *arg)
Print unified cmd usage tip.
Definition cli.c:96
void cli_nl(Cli *cli)
New line Send new ine sequence.
Definition cli.c:138
size_t cli_read_timeout(Cli *cli, uint8_t *buffer, size_t size, uint32_t timeout)
Non-blocking read from terminal.
Definition cli.c:66
void cli_write(Cli *cli, const uint8_t *buffer, size_t size)
Write to terminal Do it only from inside of cli call.
Definition cli.c:50
CliCommandFlag
Definition cli.h:28
@ CliCommandFlagDefault
Default, loader lock is used.
Definition cli.h:29
@ CliCommandFlagInsomniaSafe
Safe to run with insomnia mode on.
Definition cli.h:32
@ CliCommandFlagParallelSafe
Safe to run in parallel with other apps, loader lock is not used.
Definition cli.h:30
size_t cli_read(Cli *cli, uint8_t *buffer, size_t size)
Read from terminal.
Definition cli.c:57
void cli_delete_command(Cli *cli, const char *name)
Delete cli command.
Definition cli.c:409
void cli_add_command(Cli *cli, const char *name, CliCommandFlag flags, CliCallback callback, void *context)
Add cli command Registers you command callback.
Definition cli.c:381
struct Cli Cli
Cli type anonymous structure.
Definition cli.h:38
bool cli_cmd_interrupt_received(Cli *cli)
Non-blocking check for interrupt command received.
Definition cli.c:83
char cli_getc(Cli *cli)
Read character.
Definition cli.c:35
void(* CliCallback)(Cli *cli, FuriString *args, void *context)
Cli callback function pointer.
Definition cli.h:45