diff --git a/CommandLines.c b/CommandLines.c index ee8319e..d4576b2 100644 --- a/CommandLines.c +++ b/CommandLines.c @@ -9,6 +9,7 @@ #include #include "math.h" #include "stdlib.h" +#include "fc7xxx_driver_rgm.h" int32_t CliCmd_baseCommandHelp(void *env, tCliCmd *cli) { @@ -23,10 +24,8 @@ int32_t CliCmd_baseCommandHelp(void *env, tCliCmd *cli) { return 0; } - - int32_t CliCmd_baseCommandReboot(void *env, tCliCmd *cli) { - //NVIC_SystemReset(); + NVIC_SystemReset(); return 0; } @@ -50,11 +49,10 @@ void CommandLine_Init(tCommandLine *env, tSerialPortIO *cliVirtualPortIn_Io, tSe CliCmd_InitStatic(&env->cmd, cliVirtualPortIn_Io, cliVirtualPortOut_Io, env->mem.cmdRxLine); CliRedirectionTable_InitStatic(&env->redirectTable, env->mem.commandPrefixes); - CliRedirectionTable_RecAddStatic(&env->redirectTable, "help", CliCmd_baseCommandHelp, NULL); - CliRedirectionTable_RecAddStatic(&env->redirectTable, "mem", vTaskGetRunTime, NULL); - CliRedirectionTable_RecAddStatic(&env->redirectTable, "reboot", CliCmd_baseCommandReboot, NULL); - CliRedirectionTable_RecAddStatic(&env->redirectTable, "set_Amb_Fb", (cliCall)CliCmd_set_Amb_Fb, env); - + CliRedirectionTable_RecAddStatic(&env->redirectTable, "help", CliCmd_baseCommandHelp, NULL); + CliRedirectionTable_RecAddStatic(&env->redirectTable, "mem", vTaskGetRunTime, NULL); + CliRedirectionTable_RecAddStatic(&env->redirectTable, "reboot", CliCmd_baseCommandReboot, NULL); + CliRedirectionTable_RecAddStatic(&env->redirectTable, "set_Amb_Fb", (cliCall) CliCmd_set_Amb_Fb, env); InitThreadAtrStatic(&env->thread.attr, "CommandLine", env->thread.controlBlock, env->thread.stack, diff --git a/CommandLines.h b/CommandLines.h index 95bdedb..4c459a7 100644 --- a/CommandLines.h +++ b/CommandLines.h @@ -14,7 +14,7 @@ typedef struct { struct { tCliRedirectItem commandPrefixes[10]; - uint8_t cmdRxLine[128]; + uint8_t cmdRxLine[512]; } mem; tCliCmd cmd;