116 #ifndef CLI_COMMAND_BUF_SIZE
119 #define CLI_COMMAND_BUF_SIZE 127
148 uint8_t doublechar : 1;
172 #define CLI_DECLARE(name, iodevice, command_processor, attribute) \
173 static struct CLIConsoleDesc name##_desc = {iodevice, {0,0,0}, command_processor, {0x00}, 0, 0 }; \
174 attribute CLIConsole name = &name##_desc
342 #define CLI_HaltConsoleInput(cli) do { cli->state.busy = 1; } while (0)
350 #define CLI_EnableConsoleInput(cli) do { cli->state.busy = 0; } while (0)
360 #define CLI_GetIODevice(cli) (cli->iodevice)
369 #define CLI_SetIODevice(cli,device) (cli->iodevice=device)
uint8_t multichar
bit indicating command line mode (1) or key press mode (0: default)
Definition: hal_cli.h:147
void CLI_GetBack(CLIConsole cli, int argc)
void CLI_Destroy(CLIConsole cli)
void CLI_SetCommandProcessor(CLIConsole cli, void(*cmd_proc)(CLIConsole cli))
bool CLI_IsNextArg(CLIConsole cli)
No action was taken.
Definition: hal_cli.h:129
void(* command_processor)(CLIConsole clic)
external command processor handle
Definition: hal_cli.h:151
struct CLIConsoleDesc::@0 state
console state and work mode
uint8_t busy
bit indicating that the console is busy and unable to receive new charaters
Definition: hal_cli.h:145
bool CLI_GetNextArgINT64(CLIConsole cli, int64_t *arg)
Console is busy.
Definition: hal_cli.h:135
int rows
console size: number of rows
Definition: hal_cli.h:161
bool CLI_GetNextArgINT32(CLIConsole cli, int32_t *arg)
bool CLI_GetNextArgUINT64(CLIConsole cli, uint64_t *arg)
Definition: hali_iodevice.h:44
Command Line Interface Console descriptor.
Definition: hal_cli.h:139
size_t cnt
command buffer counter
Definition: hal_cli.h:155
bool CLI_GetCommand(CLIConsole cli, char *dst, size_t dst_size)
IODevice iodevice
IODevice object associated with console.
Definition: hal_cli.h:141
struct CLIConsoleDesc * CLIConsole
Definition: hal_cli.h:124
void CLI_CursorSave(CLIConsole cli)
size_t offset
command analyzer progress offset
Definition: hal_cli.h:157
User supplied function was called.
Definition: hal_cli.h:133
CLIConsole CLI_Create(IODevice iodevice)
bool CLI_GetNextArg(CLIConsole cli, char *arg)
int cols
console size: number of columns
Definition: hal_cli.h:159
A default action was taken (could not resolve which option call)
Definition: hal_cli.h:131
void CLI_DisplayMainScreen(CLIConsole cli)
void CLI_ForceCommandMode(CLIConsole cli)
bool CLI_GetNextArgAndConvertToLowerCase(CLIConsole cli, char *arg, size_t argMaxSize)
void CLI_CursorRestore(CLIConsole cli)
char buf[CLI_COMMAND_BUF_SIZE]
command buffer
Definition: hal_cli.h:153
#define CLI_COMMAND_BUF_SIZE
Default size of the command line buffer.
Definition: hal_cli.h:119
void CLI_CursorRest(CLIConsole cli)
CLIConsoleAction CLI_ProcessConsole(CLIConsole cli)
CLIConsoleAction
Type denoting action taken by the CLI_ProcessConsole function.
Definition: hal_cli.h:127
bool CLI_GetNextArgUINT32(CLIConsole cli, uint32_t *arg)