Tool/software:
comment récupérer le RSSI de la dernière réception dans l' exemple rfPacketRx_LP_EM_CC2340R5_nortos_ticlang
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.
Tool/software:
comment récupérer le RSSI de la dernière réception dans l' exemple rfPacketRx_LP_EM_CC2340R5_nortos_ticlang
How to insert an RSSI request in the software below
RCL_Handle rclHandle = RCL_open(&rclClient, &LRF_config);
/* Set RF frequency */
rclPacketRxCmdGenericRx.rfFrequency = FREQUENCY;
/* Start command as soon as possible */
rclPacketRxCmdGenericRx.common.scheduling = RCL_Schedule_Now;
rclPacketRxCmdGenericRx.common.status = RCL_CommandStatus_Idle;
rclPacketRxCmdGenericRx.config.fsOff = FS_OFF; // Turn off FS
rclPacketRxCmdGenericRx.config.discardRxPackets = DISCARD_RX_PACKET; // Store received packet
/* Callback triggers on last command done or packet received */
rclPacketRxCmdGenericRx.common.runtime.callback = defaultCallback;
rclPacketRxCmdGenericRx.common.runtime.rclCallbackMask.value = RCL_EventLastCmdDone.value |
RCL_EventRxEntryAvail.value;
/* Maximum packet length */
rclPacketRxCmdGenericRx.maxPktLen = MAX_LENGTH;
/* Set command to run forever until completion */
rclPacketRxCmdGenericRx.common.timing.relGracefulStopTime = 0;
/* Go back to sync search after receiving */
rclPacketRxCmdGenericRx.config.repeated = 1;
/* Setup generic status command */
stats = RCL_StatsGeneric_DefaultRuntime();
/* Set RX command statistics structure */
rclPacketRxCmdGenericRx.stats = &stats;
rclPacketRxCmdGenericRx.stats->config.activeUpdate = 1;
//GPIO_setConfig(CONFIG_GPIO_RLED, GPIO_CFG_OUT_STD | GPIO_CFG_OUT_LOW);
//GPIO_write(CONFIG_GPIO_RLED, CONFIG_GPIO_LED_OFF);
/* Initialize multi-buffer to allow RCL to store RX packet */
for(int i = 0; i < NUM_OF_PACKETS; i++)
{
multiBuffer = (RCL_MultiBuffer *) buffer[i];
RCL_MultiBuffer_init(multiBuffer, BUFF_STRUCT_LENGTH);
RCL_MultiBuffer_put(&rclPacketRxCmdGenericRx.rxBuffers,multiBuffer);
}
/* Submit command */
RCL_Command_submit(rclHandle, &rclPacketRxCmdGenericRx);
/* Pend on command completion */
RCL_Command_pend(&rclPacketRxCmdGenericRx);