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
Param | Description |
---|---|
handle | A valid handle, returned from PAL_RF_HandleGet. |
pData | Pointer to the data to transmit. |
length | Length of the data to transmit in bytes. |
txParameters | Pointer to parameters of the transmission. |
Returns
Handle (PAL_RF_TX_HANDLE type) to the requested transmission.
PAL_RF_TX_HANDLE_INVALID is returned if there was an error in the transmission request.
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.