TI的工程师们你们好:在关断RF模块前,先调用了这个函数EasyLink_abort();,
EasyLink_Status EasyLink_abort(void)
{
EasyLink_Status status = EasyLink_Status_Cmd_Error;
if ( (!configured) || suspended)
{
return EasyLink_Status_Config_Error;
}
//check an Async command is running, if not return success
if (!EasyLink_CmdHandle_isValid(asyncCmdHndl))
{
return EasyLink_Status_Aborted;
}
//force abort (gracefull param set to 0)
if (RF_cancelCmd(rfHandle, asyncCmdHndl, 0) == RF_StatSuccess)
{
/* If command is cancelled immediately, callback may have set the cmd handle to invalid.
* In that case, no need to pend.
*/
if (EasyLink_CmdHandle_isValid(asyncCmdHndl))
{
/* Wait for Command to complete */
RF_EventMask result = RF_pendCmd(rfHandle, asyncCmdHndl, (RF_EventLastCmdDone |
RF_EventCmdAborted | RF_EventCmdCancelled | RF_EventCmdStopped));
if (result & RF_EventLastCmdDone)
{
status = EasyLink_Status_Success;
}
}
else
{
/* Command already cancelled */
status = EasyLink_Status_Success;
}
}
else
{
status = EasyLink_Status_Cmd_Error;
}
return status;
}但是该函数走到这个判断就返回了
//check an Async command is running, if not return success
if (!EasyLink_CmdHandle_isValid(asyncCmdHndl))
{
return EasyLink_Status_Aborted;
}。紧接这执行RF_close函数就会卡
