2.3.7 PHY_TxDoneCallback Function

C

void PHY_TxDoneCallback(PHY_Retval_t status, PHY_FrameInfo_t *frame)

Summary

User callback function for the transmission of a frame

Description

This callback function SHOULD be defined by the upper layer(Application/MAC) for getting the status of last transmitted packet. Weak implementation for this function is available in phy_tx_done_cb.c file.

Precondition

This is a Asynchronous function call for the transmission of a frame

Parameters

ParamDescriptionComment
statusStatus of frame transmission attempt
PHY_SUCCESSThe transaction was responded to by a valid ACK, or, if no ACK is requested, after a successful frame transmission
PHY_FRAME_PENDINGEquivalent to SUCCESS and indicating that the ?Frame Pending? bit of the received acknowledgment framas set.
PHY_CHANNEL_ACCESS_FAILUREChannel is still busy after attempting MAX_CSMA_RETRIES of CSMA-CA.
PHY_NO_ACKNo acknowledgement frames were received during all retry attempts.
PHY_FAILURETransaction not yet finished.
PHY_RF_REQ_ABORTEDRF is busy performing Higher priority BLE task and the transmission is aborted
PHY_RF_UNAVAILABLERF is currently unavailable for 15.4 subsystem
framePointer to the PHY_FrameInfo_t structure or to frame array being transmitted
txFrame->mpduPointer to the PHY Payload. mpdu should hold the length of the payload(N) + 1 (for length field length)
txFrame->mpduHold the phyPayload

Returns

None

Example

void PHY_TxDoneCallback(PHY_Retval_t status, PHY_FrameInfo_t *frame)
{
    // Keep compiler happy.
    status = status;
    frame = frame;
}

Remarks

This function will be invoked by the PHY layer for the transmission of a packet or transmissionfailure reasons.