cc2640串口消息传递问题

2019-07-18 15:08发布

cc2640的任务间传递消息,我这么写有么有问题啊,这个是npi_task里的

这个是SimpleBLEPeripheral.c里的一个消息队列

我想npi_task.c中将串口消息发到SimpleBLEPeripheral.c这个任务中

static void Serail_enqueueMsg(uint8_t event, uint8_t *str)

{

  sbpEvt_t *pMsg;

  // Create dynamic pointer to message.

  if (pMsg = ICall_malloc(sizeof(sbpEvt_t)))

  {

    pMsg->event = event;

    pMsg->value = str;

    // Enqueue the message.

    Util_enqueueMsg(appMsgQueue, sem, (uint8*)pMsg);

    UartWrite("send ",6);

  }  

}



友情提示: 此问题已得到解决,问题已经关闭,关闭后问题禁止继续编辑,回答。