diff --git a/CommandLines.c b/CommandLines.c index 3d7380f..759074e 100644 --- a/CommandLines.c +++ b/CommandLines.c @@ -29,12 +29,12 @@ int32_t CliCmd_baseCommandReboot(void *env, tCliCmd *cli) { } -void CommandLine_Init(tCommandLine *env, uint8_t *countBufLoggerNames, tSerialPortIO *cliVirtualPortIn_Io, +void CommandLine_Init(tCommandLine *env, tLoggerToSerialPort *loggerToSerialPort, tSerialPortIO *cliVirtualPortIn_Io, tSerialPortIO *cliVirtualPortOut_Io) { - env->countBufLoggerNames = countBufLoggerNames; + env->loggerToSerialPort = loggerToSerialPort; - CliCmd_InitStatic(&env->cmd, cliVirtualPortIn_Io, cliVirtualPortOut_Io, env->mem.cmdRxLine); + CliCmd_InitStatic(&env->cmd, loggerToSerialPort, cliVirtualPortIn_Io, cliVirtualPortOut_Io, env->mem.cmdRxLine); CliRedirectionTable_InitStatic(&env->redirectTable, env->mem.commandPrefixes); CliRedirectionTable_RecAddStatic(&env->redirectTable, "help", CliCmd_baseCommandHelp, NULL); diff --git a/CommandLines.h b/CommandLines.h index 61a4691..4bb4d1f 100644 --- a/CommandLines.h +++ b/CommandLines.h @@ -9,6 +9,7 @@ #include "SerialPort.h" #include "CliCmd.h" #include "CliRedirectTable.h" +#include "LoggerToSerialPort.h" typedef struct { @@ -21,7 +22,7 @@ typedef struct { tCliRedirectTable redirectTable; - uint8_t *countBufLoggerNames; + tLoggerToSerialPort *loggerToSerialPort; struct { osThreadId_t id; @@ -34,7 +35,7 @@ typedef struct { int32_t vTaskGetRunTime(void *env, tCliCmd *cli); -void CommandLine_Init(tCommandLine *env, uint8_t *countBufLoggerNames, tSerialPortIO *cliVirtualPortIn_Io, +void CommandLine_Init(tCommandLine *env, tLoggerToSerialPort *loggerToSerialPort, tSerialPortIO *cliVirtualPortIn_Io, tSerialPortIO *cliVirtualPortOut_Io); void CommandLine_StartThread(tCommandLine *env); diff --git a/TasksInfo.c b/TasksInfo.c index 21675c6..9471274 100644 --- a/TasksInfo.c +++ b/TasksInfo.c @@ -42,7 +42,7 @@ int32_t vTaskGetRunTime(void *env, tCliCmd *cli) { p = strlen(bufSprintf); CliCmd_Print(cli, bufSprintf, p); - sprintf(bufSprintf, "Free Logger Buf Size = %u\n", MAX_COUNT_BUF_LOG - (unsigned int)*envCommandLine->countBufLoggerNames); + sprintf(bufSprintf, "Free Logger Buf Size = %u\n", MAX_COUNT_BUF_LOG - (unsigned int)envCommandLine->loggerToSerialPort->countBufLoggerNames); p = strlen(bufSprintf); CliCmd_Print(cli, bufSprintf, p);