#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_data | Pointer 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_metadata | Pointer to metadata structure. Contains detailed properties of data to transmit. If NULL following metadata are used:
|
- Return values
-
true | The transmission procedure was scheduled. |
false | The driver could not schedule the transmission procedure. |