cc2640的任务间传递消息,我这么写有么有问题啊,这个是npi_task里的
这个是SimpleBLEPeripheral.c里的一个消息队列
我想npi_task.c中将串口消息发到SimpleBLEPeripheral.c这个任务中
sta
tic 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);
}
}
一周热门 更多>