/* Send CMD_TX_TEST which sends forever */
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdTxTest, RF_PriorityNormal, NULL, 0);
/* Should never come here */
while (1);
}
这个发射CW的命令RF_cmdTxTest,怎样可以实现退出,运行到while(1);或者说怎样实现,可以控制发射CW的时间,发送一段时间CW后切换到其它状态
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.
/* Send CMD_TX_TEST which sends forever */
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdTxTest, RF_PriorityNormal, NULL, 0);
/* Should never come here */
while (1);
}
这个发射CW的命令RF_cmdTxTest,怎样可以实现退出,运行到while(1);或者说怎样实现,可以控制发射CW的时间,发送一段时间CW后切换到其它状态
您好,如果您要在给定时间内发送 CW,请参考以下代码:
void *mainThread(void *arg0)
{
/* Configure the radio for Proprietary mode */
RF_Params rfParams;
RF_Params_init(&rfParams);
/* Explicitly configure CW (1) or Modulated (0). Default modulated mode is PRBS-15. */
RF_cmdTxTest.config.bUseCw = 1;
// Set a relative end trigger 4ms after execution start.
RF_cmdTxTest.endTrigger.triggerType = TRIG_REL_START;
RF_cmdTxTest.endTime = RF_convertMsToRatTicks(134);
RF_cmdTxTest.config.bFsOff = 0;
/* In order to achieve +14dBm output power, make sure .txPower = 0xa73f, and
that the define CCFG_FORCE_VDDR_HH = 0x1 in ccfg.c */
/* Request access to the radio */
#if defined(DeviceFamily_CC26X0R2)
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioSetup, &rfParams);
#else
rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
#endif// DeviceFamily_CC26X0R2
/* Send CMD_FS and wait until it has completed */
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
while(1)
{
/* Send CMD_TX_TEST which sends forever */
RF_runCmd(rfHandle, (RF_Op*)&RF_cmdTxTest, RF_PriorityNormal, NULL, 0);
/* Power down the radio */
RF_yield(rfHandle);
usleep(PACKET_INTERVAL);
//RF_cmdFs.status = 0;
/* Should never come here */
}
while (1);
}
希望以上回答对您有所帮助,如有其他问题请随时联系我们。