Обновление
This commit is contained in:
parent
8ac807aee6
commit
95f198dfe4
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue