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
Param | Description | Comment |
---|---|---|
status | Status of frame transmission attempt | |
PHY_SUCCESS | The transaction was responded to by a valid ACK, or, if no ACK is requested, after a successful frame transmission | |
PHY_FRAME_PENDING | Equivalent to SUCCESS and indicating that the ?Frame Pending? bit of the received acknowledgment framas set. | |
PHY_CHANNEL_ACCESS_FAILURE | Channel is still busy after attempting MAX_CSMA_RETRIES of CSMA-CA. | |
PHY_NO_ACK | No acknowledgement frames were received during all retry attempts. | |
PHY_FAILURE | Transaction not yet finished. | |
PHY_RF_REQ_ABORTED | RF is busy performing Higher priority BLE task and the transmission is aborted | |
PHY_RF_UNAVAILABLE | RF is currently unavailable for 15.4 subsystem | |
frame | Pointer to the PHY_FrameInfo_t structure or to frame array being transmitted | |
txFrame->mpdu | Pointer to the PHY Payload. mpdu should hold the length of the payload(N) + 1 (for length field length) | |
txFrame->mpdu | Hold 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.