openthread_sys

Function otPlatRadioTransmit

Source
pub unsafe extern "C" fn otPlatRadioTransmit(
    aInstance: *mut otInstance,
    aFrame: *mut otRadioFrame,
) -> otError
Expand description

Begin the transmit sequence on the radio.

The caller must form the IEEE 802.15.4 frame in the buffer provided by otPlatRadioGetTransmitBuffer() before requesting transmission. The channel and transmit power are also included in the otRadioFrame structure.

The transmit sequence consists of:

  1. Transitioning the radio to Transmit from one of the following states:
    • Receive if RX is on when the device is idle or OT_RADIO_CAPS_SLEEP_TO_TX is not supported
    • Sleep if RX is off when the device is idle and OT_RADIO_CAPS_SLEEP_TO_TX is supported.
  2. Transmits the psdu on the given channel and at the given transmit power.

@param[in] aInstance The OpenThread instance structure. @param[in] aFrame A pointer to the frame to be transmitted.

@retval OT_ERROR_NONE Successfully transitioned to Transmit. @retval OT_ERROR_INVALID_STATE The radio was not in the Receive state.