TI中文支持网
TI专业的中文技术问题搜集分享网站

CLI_MMWaveExtensionHandler

Part Number:AWR1642BOOSTOther Parts Discussed in Thread:AWR1642

这个函数是AWR1642的SDK2.0中cli.c第216行给出的代码,我不太明白他有什么用,我贴出代码以供参考

static void CLI_task(UArg arg0, UArg arg1)
{uint8_tcmdString[256];char*tokenizedArgs[CLI_MAX_ARGS];char*ptrCLICommand;chardelimitter[] = " \r\n";uint32_targIndex;CLI_CmdTableEntry*ptrCLICommandEntry;int32_tcliStatus;uint32_tindex;/* Do we have a banner to be displayed? */if (gCLI.cfg.cliBanner != NULL){/* YES: Display the banner */CLI_write (gCLI.cfg.cliBanner);}/* Loop around forever: */while (1){/* Demo Prompt: */CLI_write (gCLI.cfg.cliPrompt);/* Reset the command string: */memset ((void *)&cmdString[0], 0, sizeof(cmdString));/* Read the command message from the UART: */UART_read (gCLI.cfg.cliUartHandle, &cmdString[0], (sizeof(cmdString) - 1));/* Reset all the tokenized arguments: */memset ((void *)&tokenizedArgs, 0, sizeof(tokenizedArgs));argIndex= 0;ptrCLICommand = (char*)&cmdString[0];/* comment lines found - ignore the whole line*/if (cmdString[0]=='%') {CLI_write ("Skipped\n");continue;}/* Set the CLI status: */cliStatus = -1;/* The command has been entered we now tokenize the command message */while (1){/* Tokenize the arguments: */tokenizedArgs[argIndex] = strtok(ptrCLICommand, delimitter);if (tokenizedArgs[argIndex] == NULL)break;/* Increment the argument index: */argIndex++;if (argIndex >= CLI_MAX_ARGS)break;/* Reset the command string */ptrCLICommand = NULL;}/* Were we able to tokenize the CLI command? */if (argIndex == 0)continue;/* Cycle through all the registered CLI commands: */for (index = 0; index < gCLI.numCLICommands; index++){ptrCLICommandEntry = &gCLI.cfg.tableEntry[index];/* Do we have a match? */if (strcmp(ptrCLICommandEntry->cmd, tokenizedArgs[0]) == 0){/* YES: Pass this to the CLI registered function */cliStatus = ptrCLICommandEntry->cmdHandlerFxn (argIndex, tokenizedArgs);if (cliStatus == 0){CLI_write ("Done\n");}else{CLI_write ("Error %d\n", cliStatus);}break;}}/* Did we get a matching CLI command? */if (index == gCLI.numCLICommands){/* NO matching command found. Is the mmWave extension enabled? */if (gCLI.cfg.enableMMWaveExtension == 1U){/* Yes: Pass this to the mmWave extension handler */cliStatus = CLI_MMWaveExtensionHandler (argIndex, tokenizedArgs);}/* Was the CLI command found? */if (cliStatus == -1){/* No: The command was still not found */CLI_write ("'%s' is not recognized as a CLI command\n", tokenizedArgs[0]);}}}
}

Nancy Wang:

我确认一下再给你回复。

,

Nancy Wang:

CLI extention 功能允许向 CLI 添加新命令。

,

qiang li16:

你好,想问下,比如channelCfg 这个命令,调用CLI_MMWaveExtensionHandler 这个句柄函数后,想问下channelcfg 中的TX RX等参数的配置是在哪里实现的

,

Nancy Wang:

参考以下帖子看一下:

e2e.ti.com/…/3195521

赞(0)
未经允许不得转载:TI中文支持网 » CLI_MMWaveExtensionHandler
分享到: 更多 (0)

© 2024 TI中文支持网   网站地图 鲁ICP备2022002796号-1