HALFRED  0.4.0
Data Structures | Macros | Typedefs | Enumerations | Functions
hal_cli.h File Reference

Command Line Interface (CLI) API. More...

Detailed Description

Command Line Interface (CLI) API.

Purpose
HALFRED Hardware Abstraction Layer
Version
Revision
1500
License
$License$
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>

Go to the source code of this file.

Data Structures

struct  CLIConsoleDesc
 Command Line Interface Console descriptor. More...
 

Macros

#define CLI_COMMAND_BUF_SIZE   127
 Default size of the command line buffer.
 
#define CLI_DECLARE(name, iodevice, command_processor, attribute)
 Macro that declares a CLIConsole object. More...
 
#define CLI_HaltConsoleInput(cli)   do { cli->state.busy = 1; } while (0)
 Disables input grabbing. More...
 
#define CLI_EnableConsoleInput(cli)   do { cli->state.busy = 0; } while (0)
 Enables input grabbing. More...
 
#define CLI_GetIODevice(cli)   (cli->iodevice)
 Gets IODevice associated with console. More...
 
#define CLI_SetIODevice(cli, device)   (cli->iodevice=device)
 Set IODevice associated with console. More...
 

Typedefs

typedef struct CLIConsoleDescCLIConsole
 

Enumerations

enum  CLIConsoleAction { CLI_NO_ACTION, CLI_DEFAULT_ACTION, CLI_USER_ACTION, CLI_BUSY }
 Type denoting action taken by the CLI_ProcessConsole function. More...
 

Functions

CLIConsole CLI_Create (IODevice iodevice)
 
void CLI_Destroy (CLIConsole cli)
 
void CLI_DisplayMainScreen (CLIConsole cli)
 
CLIConsoleAction CLI_ProcessConsole (CLIConsole cli)
 
void CLI_SetCommandProcessor (CLIConsole cli, void(*cmd_proc)(CLIConsole cli))
 
void CLI_ForceCommandMode (CLIConsole cli)
 
void CLI_CursorSave (CLIConsole cli)
 
void CLI_CursorRestore (CLIConsole cli)
 
void CLI_CursorRest (CLIConsole cli)
 
bool CLI_GetCommand (CLIConsole cli, char *dst, size_t dst_size)
 
bool CLI_IsNextArg (CLIConsole cli)
 
bool CLI_GetNextArg (CLIConsole cli, char *arg)
 
bool CLI_GetNextArgAndConvertToLowerCase (CLIConsole cli, char *arg, size_t argMaxSize)
 
bool CLI_GetNextArgINT32 (CLIConsole cli, int32_t *arg)
 
bool CLI_GetNextArgUINT32 (CLIConsole cli, uint32_t *arg)
 
bool CLI_GetNextArgINT64 (CLIConsole cli, int64_t *arg)
 
bool CLI_GetNextArgUINT64 (CLIConsole cli, uint64_t *arg)
 
void CLI_GetBack (CLIConsole cli, int argc)