nrfxlib API 2.8.99
Loading...
Searching...
No Matches

◆ nrf_802154_transmit_raw()

bool nrf_802154_transmit_raw ( uint8_t * p_data,
const nrf_802154_transmit_metadata_t * p_metadata )

#include <nrf_802154/common/include/nrf_802154.h>

Changes the radio state to RADIO_STATE_TX.

Note
If the CPU is halted or interrupted while this function is executed, nrf_802154_transmitted_raw or nrf_802154_transmit_failed can be called before this function returns a result.
This function is implemented in zero-copy fashion. It passes the given buffer pointer to the RADIO peripheral.
This function is available if NRF_802154_USE_RAW_API is enabled.

In the transmit state, the radio transmits a given frame. If requested, it waits for an ACK frame. Depending on NRF_802154_ACK_TIMEOUT_ENABLED, the radio driver automatically stops waiting for an ACK frame or waits indefinitely for an ACK frame. If it is configured to wait, the MAC layer is responsible for calling nrf_802154_receive or nrf_802154_sleep after the ACK timeout. The transmission result is reported to the higher layer by calls to nrf_802154_transmitted_raw or nrf_802154_transmit_failed.

* p_data
* v
* +-----+-----------------------------------------------------------+------------+
* | PHR | MAC header and payload                                    | FCS        |
* +-----+-----------------------------------------------------------+------------+
*       |                                                                        |
*       | <---------------------------- PHR -----------------------------------> |
* 
Parameters
[in]p_dataPointer to the array with data to transmit. The first byte must contain frame length (including FCS). The following bytes contain data. The CRC is computed automatically by the radio hardware. Therefore, the FCS field can contain any bytes.
[in]p_metadataPointer to metadata structure. Contains detailed properties of data to transmit. If NULL following metadata are used:
Field Value
frame_props NRF_802154_TRANSMITTED_FRAME_PROPS_DEFAULT_INIT
cca true
Return values
trueThe transmission procedure was scheduled.
falseThe driver could not schedule the transmission procedure.