#include <nrf_802154/common/include/nrf_802154.h>
Performs the CSMA-CA procedure and transmits a frame in case of success.
The end of the CSMA-CA procedure is notified by nrf_802154_transmitted_raw or nrf_802154_transmit_failed.
- Note
- The driver may be configured to automatically time out waiting for an ACK frame depending on NRF_802154_ACK_TIMEOUT_ENABLED. If the automatic ACK timeout is disabled, the CSMA-CA procedure does not time out waiting for an ACK frame if a frame with the ACK request bit set was transmitted.
-
This function is available if NRF_802154_CSMA_CA_ENABLED is enabled.
-
Setting
tx_timestamp_encode to true is only allowed if NRF_802154_TX_TIMESTAMP_PROVIDER_ENABLED is enabled. If this condition is not met, any attempt to transmit a frame will fail unconditionally.
- Parameters
-
| [in] | p_data | Pointer to the frame to transmit. See also nrf_802154_transmit_raw. |
| [in] | p_metadata | Pointer to metadata structure. Contains detailed properties of data to transmit. If NULL following metadata are used:
|
- Return values
-
| NRF_802154_TX_ERROR_NONE | The TX request was successful. Transmit success or failure will be indicated by the callout. |
- Returns
- Error that prevented the frame from being transmitted. No callout will be called.