1.5.3.6 PAL_RF_TxRequest Function

C

PAL_RF_TX_HANDLE PAL_RF_TxRequest(PAL_RF_HANDLE handle, uint8_t *pData,
                                  uint16_t length, PAL_RF_TX_PARAMETERS *txParameters);

Summary

Allows a client to transmit data through RF device.

Description

This routine sends a new data message through RF using the RF PAL module.

Precondition

PAL_RF_HandleGet must have been called to obtain a valid RF PAL handle.

Parameters

ParamDescription
handleA valid handle, returned from PAL_RF_HandleGet.
pDataPointer to the data to transmit.
lengthLength of the data to transmit in bytes.
txParametersPointer to parameters of the transmission.

Example

// 'palRfHandle', returned from the PAL_RF_HandleGet
uint8_t txData[128];
PAL_RF_TX_PARAMETERS txParameters;
uint16_t length = 128;

txParameters.timeCount = SYS_TIME_Counter64Get() + SYS_TIME_USToCount(5000);
txParameters.txPowerAttenuation = 0;
txParameters.csmaEnable = true;

PAL_RF_TxRequest(palRfHandle, txData, length, &txParameters);

Remarks

The handle returned by this function is needed to cancel the transmission with PAL_RF_TxCancel.