#include "FreeRTOS.h"
#include "stdbool.h"
#include "stdint.h"
#include "string.h"
#include "task.h"
#include "devices.h"
#include "flash.h"
#include "uart.h"
Go to the source code of this file.
- Author
- Matt Ricci
Definition in file shell.h.
◆ ShellProgramHandle_t
struct ShellProgramHandle_t |
◆ Shell
◆ ShellTaskParams
◆ Shell_init()
int Shell_init |
( |
Shell * | shell | ) |
|
Initializes the shell, registering programs from shell vector.
Configures shell structure, sets up functions, and registers available shell programs. Returns an error code if the number of programs exceeds the maximum.
- Parameters
-
shell | Pointer to the Shell structure to initialize. |
- Returns
- 0 on success, 1 if the program count exceeds the maximum.
Definition at line 45 of file shell.c.
◆ Shell_help()
void Shell_help |
( |
Shell * | shell | ) |
|
Displays available shell commands.
Prints a list of all registered shell commands to the USB interface.
- Parameters
-
shell | Pointer to the Shell structure. |
- Returns
- void
Definition at line 80 of file shell.c.
◆ Shell_runTask()
void Shell_runTask |
( |
Shell * | shell, |
|
|
uint8_t * | str ) |
Creates a task to run a shell program.
Initializes task parameters and spawns a new RTOS task to parse and execute the shell program.
- Parameters
-
shell | Pointer to the Shell structure containing the program details. |
str | Command string to parse and execute. |
- Returns
- void
Definition at line 134 of file shell.c.
◆ Shell_run()
void Shell_run |
( |
Shell * | shell, |
|
|
uint8_t * | programName ) |
Executes a shell program by name.
Parses the program name and flags, then finds and runs the corresponding shell program.
- Parameters
-
shell | Pointer to the Shell structure containing registered programs. |
programName | Name of the program to execute, with optional flags. |
- Returns
- void
Definition at line 104 of file shell.c.
◆ Shell_clear()
bool Shell_clear |
( |
Shell * | shell | ) |
|
Send clear sequence to host terminal.
usbClearCommandExecute
transmits over UART an ANSI control sequence for clearing the host terminal window.
Definition at line 159 of file shell.c.