15static void Help_exec(
UART_t *,
char *);
16extern uint32_t __shell_vector_start;
17extern uint32_t __shell_vector_end;
19DEFINE_PROGRAM_HANDLE(
"help", Help_exec, NULL)
26static void Help_exec(
UART_t *uart,
char *flags) {
28 for (uint32_t *i = (uint32_t *)&__shell_vector_start; i < (uint32_t *)&__shell_vector_end; i++) {
30 if (!strcmp(handle->
name, flags)) {
31 if (handle->
help == NULL)
32 uart->println(uart,
"No help documentation found.");
39 uart->println(uart,
"Use `help [name]` for more information on a specific command");
40 uart->println(uart,
"The following commands are currently available:");
41 for (uint32_t *i = (uint32_t *)&__shell_vector_start; i < (uint32_t *)&__shell_vector_end; i++) {
43 if (strcmp(handle->
name,
"")) {
44 uart->print(uart,
":");
45 uart->print(uart, handle->
name);
46 uart->print(uart,
"\n\r");
49 uart->println(uart,
"Use <Ctrl+z> to toggle the Australis core between paused and active states.");
50 uart->println(uart,
"Use <Ctrl+c> to kill an active command.");
char name[SHELL_PROGRAM_NAME_LENGTH]
Program name as referenced by the shell.
void(* help)(UART_t *)
Program help-string print function.
Struct definition for shell program handle.
Struct definition for UART interface.