|
|
@ -121,7 +121,6 @@ static BaseType_t _cli_save(const char *string);
|
|
|
|
static BaseType_t _cli_show(const char *string);
|
|
|
|
static BaseType_t _cli_show(const char *string);
|
|
|
|
static BaseType_t _cli_spi(const char *string);
|
|
|
|
static BaseType_t _cli_spi(const char *string);
|
|
|
|
static BaseType_t _cli_work_mode(const char *string);
|
|
|
|
static BaseType_t _cli_work_mode(const char *string);
|
|
|
|
static BaseType_t _cli_debug_msg(const char *string);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#if LD_DEBUG
|
|
|
|
#if LD_DEBUG
|
|
|
|
static BaseType_t _cli_debug(const char *string);
|
|
|
|
static BaseType_t _cli_debug(const char *string);
|
|
|
@ -148,7 +147,6 @@ static const CLI_Command_Definition_t cmd_save = {"save", _cli_save, 1};
|
|
|
|
static const CLI_Command_Definition_t cmd_show = {"show", _cli_show, 2};
|
|
|
|
static const CLI_Command_Definition_t cmd_show = {"show", _cli_show, 2};
|
|
|
|
static const CLI_Command_Definition_t cmd_test = {"spi", _cli_spi, 3};
|
|
|
|
static const CLI_Command_Definition_t cmd_test = {"spi", _cli_spi, 3};
|
|
|
|
static const CLI_Command_Definition_t cmd_work_mode = {"work-mode", _cli_work_mode, 1};
|
|
|
|
static const CLI_Command_Definition_t cmd_work_mode = {"work-mode", _cli_work_mode, 1};
|
|
|
|
static const CLI_Command_Definition_t cmd_debug_msg = {"msg", _cli_debug_msg, 1};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* Internal functions --------------------------------------------------------*/
|
|
|
|
/* Internal functions --------------------------------------------------------*/
|
|
|
|
/* cli获取互斥锁. */
|
|
|
|
/* cli获取互斥锁. */
|
|
|
@ -626,35 +624,6 @@ static BaseType_t _cli_spi(const char *string)
|
|
|
|
return pdFALSE;
|
|
|
|
return pdFALSE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static BaseType_t _cli_debug_msg(const char *string)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const char *param = NULL;
|
|
|
|
|
|
|
|
uint8_t param_len = 0;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
param = FreeRTOS_CLIGetParameter(string, 1, (BaseType_t *)¶m_len);
|
|
|
|
|
|
|
|
if (NULL == param)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
vty_print(cli_param_erro);
|
|
|
|
|
|
|
|
return pdFALSE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
switch(param[0])
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
case 'm':
|
|
|
|
|
|
|
|
//_debug_pkt_adj_auto(); // 一个分段点 100A
|
|
|
|
|
|
|
|
_debug_pkt_adj_auto2();
|
|
|
|
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
vty_print(cli_param_erro);
|
|
|
|
|
|
|
|
return pdFALSE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
vty_print(cli_rv_ok);
|
|
|
|
|
|
|
|
return pdFALSE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 工作模式配置命令. */
|
|
|
|
/* 工作模式配置命令. */
|
|
|
|
static BaseType_t _cli_work_mode(const char *string)
|
|
|
|
static BaseType_t _cli_work_mode(const char *string)
|
|
|
|
{
|
|
|
|
{
|
|
|
@ -827,7 +796,6 @@ static void _cli_start(void)
|
|
|
|
FreeRTOS_CLIRegisterCommand(&cmd_show, CLI_NODE_COMMON);
|
|
|
|
FreeRTOS_CLIRegisterCommand(&cmd_show, CLI_NODE_COMMON);
|
|
|
|
FreeRTOS_CLIRegisterCommand(&cmd_test, CLI_NODE_COMMON);
|
|
|
|
FreeRTOS_CLIRegisterCommand(&cmd_test, CLI_NODE_COMMON);
|
|
|
|
FreeRTOS_CLIRegisterCommand(&cmd_work_mode, CLI_NODE_CONFIG);
|
|
|
|
FreeRTOS_CLIRegisterCommand(&cmd_work_mode, CLI_NODE_CONFIG);
|
|
|
|
FreeRTOS_CLIRegisterCommand(&cmd_debug_msg, CLI_NODE_CONFIG);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for(;;)
|
|
|
|
for(;;)
|
|
|
|
{
|
|
|
|
{
|
|
|
|