All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Loading...
Searching...
No Matches
shell.h File Reference

Shell interface definition. More...

Detailed Description

Shell interface definition.

Definition in file shell.h.

#include <stdint.h>
#include "periph/pm.h"
#include "modules.h"
#include "xfa.h"
#include "flash_utils.h"
+ Include dependency graph for shell.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  shell_command_t
 A single command in the list of the supported commands. More...
 
struct  shell_command_xfa_t
 A single command in the list of the supported commands. More...
 

Macros

#define CONFIG_SHELL_SHUTDOWN_ON_EXIT   0
 Shutdown RIOT on shell exit.
 
#define CONFIG_SHELL_NO_ECHO   0
 Set to 1 to disable shell's echo.
 
#define CONFIG_SHELL_NO_PROMPT   0
 Set to 1 to disable shell's prompt.
 
#define SHELL_DEFAULT_BUFSIZE   (128)
 Default shell buffer size (maximum line length shell can handle)
 
#define SHELL_COMMAND(cmd, help, func)
 Define shell command.
 

Typedefs

typedef int(* shell_command_handler_t) (int argc, char **argv)
 Prototype of a shell callback handler.
 
typedef struct shell_command_t shell_command_t
 A single command in the list of the supported commands.
 

Functions

void shell_post_readline_hook (void)
 Optional hook after readline has triggered.
 
void shell_pre_command_hook (int argc, char **argv)
 Optional hook before shell command is called.
 
void shell_post_command_hook (int ret, int argc, char **argv)
 Optional hook after shell command is called.
 
void shell_run_once (const shell_command_t *commands, char *line_buf, int len)
 Start a shell and exit once EOF is reached.
 
static void shell_run_forever (const shell_command_t *commands, char *line_buf, int len)
 Start a shell and restart it if it exits.
 
static void shell_run (const shell_command_t *commands, char *line_buf, int len)
 Back-porting alias for shell_run_forever.
 
int shell_handle_input_line (const shell_command_t *commands, char *line)
 Parse and run a line of text as a shell command with arguments.
 
int shell_parse_file (const shell_command_t *commands, const char *filename, unsigned *line_nr)
 Read shell commands from a file and run them.