您好,请问CC2640R2F想自定义消息触发以及事件触发,要参考哪个例程?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
我在GPTimerCallback函数中添加队列消息,但是仿真过程中,程序无法进入GPTimer_enqueueMsg()函数,请问是因为不能在Callback函数中添加队列消息吗?
#define GPTimer_MSG_GET_DATA_EVENT 0x0020
typedef struct{
appEvtHdr_t hdr;
uint8_t *pData;
}Msg_t;
static void GPTimerCallback(GPTimerCC26XX_Handle handle,GPTimerCC26XX_IntMask interruptMask)
{
GPTimer_enqueueMsg();
}
static void GPTimer_enqueueMsg(void)
{
Queue_Handle appMsgQueue;
Event_Handle syncEvent;
Msg_t *pMsg = ICall_malloc(sizeof(Msg_t));
if (pMsg){
pMsg->hdr.event = GPTimer_MSG_GET_DATA_EVENT;
pMsg->hdr.state = NULL;
pMsg->pData = NULL;
Util_enqueueMsg(appMsgQueue,syncEvent,(uint8_t *)pMsg);
}