To use shell commands, four files, in addition to the clk module, must be included in the build:
Micirum/Software/uC-Clk/Cmd/clk_cmd.c
Micirum/Software/uC-Clk/Cmd/clk_cmd.h
Micrium/Software/uC-Shell/Source/shell.c
Micrium/Software/uC-Shell/Source/shell.h
The file clk_cmd.h
and shell.h
must also be #included in any application or header files initialize µC/Shell or handle shell commands. The following directories must be on the project include path:
Micrium/Software/uC-Clk/Cmd
Micrium/Software/uC-Shell
µC/Shell with the µC/Clk shell commands is initialized in . The clk module initialization (
Clk_Init
()
) function should have previously been called. Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
CPU_BOOLEAN App_ShellInit (void) { CPU_BOOLEAN ok; CLK_CMD_ERR clk_cmd_err; ok = Shell_Init(); if (ok == DEF_FAIL) { return (DEF_FAIL); } ClkCmd_Init(&clk_cmd_err); if (clk_cmd_err != CLK_CMD_ERR_NONE) { return (DEF_FAIL); } return (DEF_OK); } |