Go to the documentation of this file.
35 #ifndef CONFIG_SHELL_SHUTDOWN_ON_EXIT
42 # define CONFIG_SHELL_SHUTDOWN_ON_EXIT 1
49 #define SHELL_DEFAULT_BUFSIZE (128)
132 char *line_buf,
int len)
137 if (
IS_ACTIVE(CONFIG_SHELL_SHUTDOWN_ON_EXIT)) {
151 char *line_buf,
int len)
void shell_run_once(const shell_command_t *commands, char *line_buf, int len)
Start a shell and exit once EOF is reached.
int(* shell_command_handler_t)(int argc, char **argv)
Protype of a shell callback handler.
void pm_off(void)
Turn off MCU completely.
Common macros and compiler attributes/pragmas configuration.
static void shell_run(const shell_command_t *commands, char *line_buf, int len)
Back-porting alias for shell_run_forever.
const char * name
Name of the function.
void shell_post_readline_hook(void)
Optional hook after readline has triggered.
void shell_post_command_hook(int ret, int argc, char **argv)
Optional hook after shell command is called.
void shell_pre_command_hook(int argc, char **argv)
Optional hook before shell command is called.
A single command in the list of the supported commands.
static void shell_run_forever(const shell_command_t *commands, char *line_buf, int len)
Start a shell and restart it if it exits.
struct shell_command_t shell_command_t
A single command in the list of the supported commands.
#define IS_ACTIVE(macro)
Allows to verify a macro definition outside the preprocessor.
const char * desc
Description to print in the "help" command.
Power management interface.
shell_command_handler_t handler
The callback function.