uint32_t events = Event_pend(radioOperationEventHandle, 0, RADIO_EVENT_ALL, BIOS_WAIT_FOREVER);
if(events & RADIO_EVENT_JOIN_NWM_RECEIVED)
{
Nwk_Join_Key_func();
// if(EasyLink_receiveAsync(RxReceive_amge_Callback, 0) != EasyLink_Status_Success)
// {
// System_abort("EasyLink_receiveAsync failed");
// }
}
static void NwkJoinCallback(PIN_Handle handle, PIN_Id pinId)
{
/* Debounce logic, only toggle if the button is still pushed (low) */
CPUdelay(8000*50);
if (PIN_getInputValue(NwkJoin_key) == 0)
{
Event_post(radioOperationEventHandle, RADIO_EVENT_JOIN_NWM_RECEIVED);
// Semaphore_post(test_SemHandle);
}
}
刚开始运行几分钟,可以连续触发事件, 等过些时间,能运行到再次触发Event_post(radioOperationEventHandle, RADIO_EVENT_JOIN_NWM_RECEIVED);
这个事件。就无法到
uint32_t events = Event_pend(radioOperationEventHandle, 0, RADIO_EVENT_ALL, BIOS_WAIT_FOREVER);
if(events & RADIO_EVENT_JOIN_NWM_RECEIVED)
{
Nwk_Join_Key_func();
// if(EasyLink_receiveAsync(RxReceive_amge_Callback, 0) != EasyLink_Status_Success)
// {
// System_abort("EasyLink_receiveAsync failed");
// }
}
里面。
gui tan:
if (EasyLink_transmit(&txpacket) != EasyLink_Status_Success){System_abort("EasyLink_transmit failed");}
最后是与这个函数有关系,多次引用这个发送函数。
Alvin Chen:
回复 gui tan:
是的,你有做什么修改吗?或者你传输遇到了什么问题?掉线之类的,进入这里意味着你传输有问题。
gui tan:
回复 Alvin Chen:
我把例子全部改了变成自己的私协议方式!
gui tan:
回复 Alvin Chen:
*======== Power_idleFunc ========*Function needs to be plugged into the idle loop.*It calls the configured policy function if the*'enablePolicy' flag is set.*/
void Power_idleFunc()
{if (PowerCC26X2_module.enablePolicy) {if (PowerCC26X2_module.policyFxn != NULL) {(*(PowerCC26X2_module.policyFxn))();}}
}int_fast16_t Power_sleep(uint_fast16_t sleepState)
当再有外部中断触发事件时。都在这里几个函数里运行。都没到跑到任务中。感觉就像进入休眠,不能唤醒一样!