| 12345678910111213141516171819202122232425262728293031323334 |
- #ifndef __SMP_SHELL_H__
- #define __SMP_SHELL_H__
- #include "stdint.h"
- #ifdef __cplusplus
- extern "C" {
- #endif
- #define SHELL_CMDLEN_MAX (128) // maximum string length of a command
- #define SHELL_ARGNUM_MAX (16) // maximum arg number of a command
- #define SHELL_FLAG_ARG_VLD (0x0001u)
- #define SHELL_FLAG_DEL_CH (0x0002u)
- #define SHELL_FLAG_ECHO_CH (0x0004u)
- typedef void (*cmd_func)(uint8_t argc, char **argv);
- typedef struct {
- char *name;
- char *help;
- cmd_func func;
- }Shell_Cmd_t;
- void ShellRxCh(uint8_t ch);
- void ShellHandler(void);
- #ifdef __cplusplus
- }
- #endif
- #endif
|