新人求助。求详细注释=每行代码的注释
zigbee吧
全部回复
仅看楼主
level 2
static void GenericApp_ProcessRtosMessage( void )
{
osalQueue_t inMsg;
if ( osal_queue_receive( OsalQueue, &inMsg, 0 ) == pdPASS )
{
uint8 cmndId = inMsg.cmnd;
uint32 counter = osal_build_uint32( inMsg.cbuf, 4 );
switch ( cmndId )
{
case CMD_INCR:
counter += 1; /* Increment the incoming counter 自增计数器*/
/* Intentionally fall through next case */
case CMD_ECHO:
{
userQueue_t outMsg;
outMsg.resp = RSP_CODE | cmndId; /* Response ID */
osal_buffer_uint32( outMsg.rbuf, counter ); /* Increment counter */
osal_queue_send( UserQueue1, &outMsg, 0 ); /* Send back to UserTask */
break;
}
default:
break; /* Ignore unknown command */
}
}
}
#endif
[委屈]
2016年12月08日 15点12分 1
level 2
在线等,急
2016年12月08日 15点12分 2
1