RPV Event driven kernel
Loading...
Searching...
No Matches
command.h
1#pragma once
2
3#include <stdint.h>
4
20struct command_s {
21
29 const char* text;
30
51 int (*const handler)(const int argc, const char **argv);
52};
53
58typedef struct command_s command_t;
59
103#define _SHELL_COMMAND(name, callback) \
104 __attribute__((used, section(".cmd_table"))) \
105 static const command_t name = { #name, callback }
Command descriptor structure.
Definition command.h:20
const char * text
Null-terminated command name string.
Definition command.h:29
int(*const handler)(const int argc, const char **argv)
Command handler function pointer.
Definition command.h:51