37 static void cmd_mem(BaseSequentialStream *lchp,
int argc,
const char *
const argv[])
39 size_t n, total, largest;
47 n = chHeapStatus(NULL, &total, &largest);
48 chCoreGetStatusX(&area);
49 chprintf(lchp,
"core free memory : %u bytes\r\n", area.size);
50 chprintf(lchp,
"heap fragments : %u\r\n", n);
51 chprintf(lchp,
"heap free total : %u bytes\r\n", total);
52 chprintf(lchp,
"heap free largest: %u bytes\r\n", largest);
55 static void cmd_abi(BaseSequentialStream *lchp,
int argc,
const char *
const argv[])
63 chprintf(lchp,
"ABI message bindings\r\n");
64 for (
int i = 0; i < ABI_MESSAGE_NB; i++) {
66 if (abi_queues[i] == NULL) {
106 thread_t *shelltp = shellCreateFromHeap(&
shell_cfg, 2048U, NORMALPRIO);
107 if (shelltp == NULL) {
108 chSysHalt(
"fail starting shell");
Main include for ABI (AirBorneInterface).
#define ABI_FOREACH(head, el)
Macros for linked list.
Event structure to store callbacks in a linked list.
BaseSequentialStream * sc_channel
I/O channel associated to the shell.
void shellInit(void)
Shell manager initialization.
Custom command entry type.
void chprintf(BaseSequentialStream *lchp, const char *fmt,...)
Mini printf-like functionality.
void() shell_cmd_t(shell_stream_t *stream, int argc, const char *const argv[])
Command handler.
void shell_init_arch(void)
Arch init.
static void cmd_mem(BaseSequentialStream *lchp, int argc, const char *const argv[])
static const ShellCommand commands[]
static ShellConfig shell_cfg
void shell_add_entry(char *cmd_name, shell_cmd_t *cmd)
Add dynamic entry.
static void cmd_abi(BaseSequentialStream *lchp, int argc, const char *const argv[])
arch independent UART (Universal Asynchronous Receiver/Transmitter) API