ZHCAB93 July 2021 DRA821U , DRA821U-Q1 , DRA829J , DRA829V , DRA829V-Q1 , TDA4VM , TDA4VM-Q1
该代码片段提供了 SciClient 和 SciServer 初始化的一个实现示例。
sint32 SetupSciServer(void)
{
#if (defined (BUILD_MCU1_0) && (defined (SOC_J721E) || defined (SOC_J7200)))
Sciserver_TirtosCfgPrms_t appPrms;
Sciclient_ConfigPrms_t clientPrms;
sint32 ret = CSL_PASS;
appPrms.taskPriority[SCISERVER_TASK_USER_LO] = 1;
appPrms.taskPriority[SCISERVER_TASK_USER_HI] = 4;
/* Sciclient 需要在 Sciserver 之前被初始化。Sciserver 依赖
* Sciclient API 来转发信息 */
ret = Sciclient_configPrmsInit(&clientPrms);
if (ret == CSL_PASS)
{
ret = Sciclient_init(&clientPrms);
}
if (ret == CSL_PASS)
{
ret = Sciserver_tirtosInit(&appPrms);
}
if (ret == CSL_PASS)
{
AppUtils_Printf(MSG_NORMAL, "Starting Sciserver.....PASSED\n");
}
else
{
AppUtils_Printf(MSG_NORMAL, "Starting Sciserver.....FAILED\n");
}
#endif
return ret;
}
Sciserver_tirtosInit() 的示例代码可以在 PDK 公共 GIT 中的 $J7SDK/ti-processor-sdk-rtos-j721e-evm-xx_xx_xx_xx/pdk_jacinto_xx_xx_xx_xx/packages/ti/drv/sciclient/src/sciserver/sciserver_tirtos.c 处找到,点击此处即可查看。