fix the bug of tos shell

This commit is contained in:
mculover666
2021-09-25 12:10:35 +08:00
parent 2540b9fc41
commit d285144a8f
10 changed files with 2863 additions and 30 deletions

View File

@@ -26,7 +26,7 @@
#define SHELL_PARSER_TASK_STACK_SIZE 1024
#define SHELL_PARSER_TASK_PRIO 3
typedef void (*shell_output_t)(const char *str);
typedef void (*shell_output_t)(const char ch);
typedef struct shell_control_st {
k_task_t parser;
@@ -53,6 +53,8 @@ __API__ int tos_shell_cmd_set_unregiser(const shell_cmd_set_t *cmd_set);
__API__ void tos_shell_printf(const char *format, ...);
__API__ void tos_shell_printfln(const char *format, ...);
__API__ void tos_shell_input_byte(uint8_t data);
#endif /* _TOS_SHELL_H_ */

View File

@@ -33,6 +33,8 @@ typedef struct shell_command_set_st {
const shell_cmd_t *const commands;
} shell_cmd_set_t;
__KNL__ int cmd_help(int argc, char *argv[]);
__KNL__ int shell_cmd_set_regiser(const shell_cmd_set_t *cmd_set);
__KNL__ int shell_cmd_set_unregiser(const shell_cmd_set_t *cmd_set);