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

关于CC2630 process函数的一些疑问

刚接触CC2630,有一些疑问,请TI的工程师解答一下,麻烦尽量解答详细一点,非常感谢!

1. 这个代码是基于TI-RTOS的,我本身对操作系统不是很熟悉,怎么能知道比如 ICall_wait(ICALL_TIMEOUT_FOREVER) == ICALL_ERRNO_SUCCESS,这些代码的含义啊,怎么也不给一个解释,这是什么意思?

2. 基于下面的代码,如果我想假如我自己的程序,比如让一个LED灯循环的亮灭,我该把程序加在那个地方,程序该怎么写?是需要建立一个task吗?

3.怎么了解TI-RTOS里面的任务,消息,邮箱,事件的一些关系与处理啊?这些基本的操作系统的东西。TI给了一个TI-RTOS 2.16  User’s Guide上面好像不提这些东西,也不提一些函数是什么意思,这个怎么搞懂啊?

4.用CC2630做为终端节点,CC2530做协调器或者路由,进行组网通信,CC2630上面的代码必须用TI-RTOS操作系统吗?

static void DLSApp_process(void)
{
/* Forever loop */
for(;;)
{
ICall_ServiceEnum stackid;
ICall_EntityID dest;
zstackmsg_genericReq_t *pMsg;

/* Wait for response message */
if(ICall_wait(ICALL_TIMEOUT_FOREVER) == ICALL_ERRNO_SUCCESS)
{
/* Retrieve the response message */
if(ICall_fetchServiceMsg(&stackid, &dest, (void **)&pMsg)
== ICALL_ERRNO_SUCCESS)
{
if((stackid == ICALL_SERVICE_CLASS_ZSTACK) &&
(dest == zdlEntity))
{
if(pMsg)
{
DLSApp_processZStackMsgs(pMsg);

// Free any separately allocated memory
Zstackapi_freeIndMsg(pMsg);
}
}

if(pMsg)
{
ICall_freeMsg(pMsg);
}
}

if(events & DLSAPP_KEY_EVENT)
{
// Process Key Presses
DLSApp_handleKeys(keys);
keys = 0;

// Clear the event, until next time
events &= ~DLSAPP_KEY_EVENT;
}

if(events & DLSAPP_IDENTIFY_TIMEOUT_EVT)
{
// Count down the Identify Timer
if(zdlIdentifyTime > 0)
{
zdlIdentifyTime–;
}

// Identify Timeout value has changed – process it
DLSApp_processIdentifyTimeChange();

// Clear the event, until next time
events &= ~DLSAPP_IDENTIFY_TIMEOUT_EVT;
}

if(events & DLSAPP_MAIN_SCREEN_EVT)
{
// Update the display
giDlScreenMode = DLSAPP_MAINMODE;
DLSApp_displayLcdMainScreen();

// Clear the event, until next time
events &= ~DLSAPP_MAIN_SCREEN_EVT;
}

#if defined (ZCL_EZMODE)
if(events & DLSAPP_EZMODE_NEXTSTATE_EVT)
{
// going on to next state
zcl_EZModeAction(EZMODE_ACTION_PROCESS, NULL);

// Clear the event, until next time
events &= ~DLSAPP_EZMODE_NEXTSTATE_EVT;
}

if(events & DLSAPP_EZMODE_TIMEOUT_EVT)
{
// EZ-Mode timed out
zcl_EZModeAction(EZMODE_ACTION_TIMED_OUT, NULL);

// Clear the event, until next time
events &= ~DLSAPP_EZMODE_TIMEOUT_EVT;
}
#endif // ZLC_EZMODE
}
}
}

Jiang Bo:

你好,请问你解决了你的问题了吗?我才开始做,可以请教下吗

赞(0)
未经允许不得转载:TI中文支持网 » 关于CC2630 process函数的一些疑问
分享到: 更多 (0)