cc1310 rfEasylink nortos 里面的接收变量 bEchoDoneFlag 在什么地方改变值,那个callback函数是哪一个,
user5028722:
回复 Alvin Chen:
那接收到的数据是什么时候赋值到rxPacket里面的?
这应该是已经把数据解析过了
user5028722:
回复 Alvin Chen:
当开启了IntMasterEnable()中断之后,接收回调是自动调用的吗?
Alvin Chen:
回复 user5028722:
上面程序不是有吗?你仔细看一下哈。
/* Copy contents of RX packet to TX packet */
memcpy(&txPacket.payload, rxPacket->payload, rxPacket->len);
user5028722:
回复 Alvin Chen:
为什么这个循环是一直把中断打开然后在关闭,为什么不一直打开呢?要这样一直开关
while(bEchoDoneFlag == false){ bool previousHwiState = IntMasterDisable(); /* * Tricky IntMasterDisable(): * true : Interrupts were already disabled when the function was * called. * false : Interrupts were enabled and are now disabled. */ IntMasterEnable(); Power_idleFunc(); IntMasterDisable();
if(!previousHwiState) { IntMasterEnable(); } };
Alvin Chen:
回复 user5028722:
/* Wait for Tx to complete. A Successful TX will cause the echoTxDoneCb* to be called and the bEchoDoneFlag to be set*/while(bEchoDoneFlag == false){bool previousHwiState = IntMasterDisable();/** Tricky IntMasterDisable():* true: Interrupts were already disabled when the function was*called.* false : Interrupts were enabled and are now disabled.*/IntMasterEnable();Power_idleFunc();IntMasterDisable();
if(!previousHwiState){IntMasterEnable();}};
Alvin Chen:
回复 user5028722:
要确保处理完成,假如上一次的数据还在处理, 一直开着当新来一个数据,就会打断上一次的数据处理。