/*================================================================================================= * @fn txComplete * * @brief Transmit has completed. Perform needed maintenance and return status of * the transmit via callback function. * * @param status - status of the transmit that just went out * * @return none *================================================================================================= */ static void txComplete(uint8 status) { /* reset the retransmit flag */ txRetransmitFlag = 0; /* update tx state; turn off receiver if nothing is keeping it on */ macTxActive = MAC_TX_ACTIVE_NO_ACTIVITY; /* If no ACK is pending go to sleep sooner than wait for high level mac * to clear MAC_RX_POLL bit and then go to sleep */ if (status != MAC_ACK_PENDING) { macRxEnableFlags &= ~MAC_RX_POLL; } /* turn off receive if allowed */ macRxOffRequest(); /* update transmit power in case there was a change */ macRadioUpdateTxPower(); /* * Channel cannot change during transmit so update it here. (Channel *can* change during * a receive. The update function resets receive logic and any partially received * frame is purged.) */ macRadioUpdateChannel(); /* return status of transmit via callback function */ macTxCompleteCallback(status); }
/*================================================================================================= * @fn txComplete * * @brief Transmit has completed. Perform needed maintenance and return status of * the transmit via callback function. * * @param status - status of the transmit that just went out * * @return none *================================================================================================= */ static void txComplete(uint8 status) { /* * Unless receive is active, update power here. Power is *always* updated at end of receive. */ if (!macRxActive) { macRadioUpdateTxPower(); } /* * Channel cannot change during transmit so update it here. (Channel *can* change during * a receive. The update function resets receive logic and any partially received * frame is purged.) */ macRadioUpdateChannel(); /* reset the retransmit flag */ txRetransmitFlag = FALSE; /* update tx state; turn off receiver if nothing is keeping it on */ macTxActive = FALSE; /* turn off receive if allowed */ macRxOffRequest(); /* return status of transmit via callback function */ macTxCompleteCallback(status); }
/*================================================================================================= * @fn txComplete * * @brief Transmit has completed. Perform needed maintenance and return status of * the transmit via callback function. * * @param status - status of the transmit that just went out * * @return none *================================================================================================= */ static void txComplete(uint8 status) { /* reset the retransmit flag */ txRetransmitFlag = 0; /* update tx state; turn off receiver if nothing is keeping it on */ macTxActive = MAC_TX_ACTIVE_NO_ACTIVITY; if(pMacPib->rf4cepowerSavings) { /* mark receive as inactive */ macRxActive = MAC_RX_ACTIVE_NO_ACTIVITY; } /* In general, the MAC_RX_POLL is controlled by high level MAC. The flag is * cleared here when no ACK is pending to allow the RX to be turned off sooner * in order to save power. */ if (status != MAC_ACK_PENDING) { macRxEnableFlags &= ~MAC_RX_POLL; } /* turn off receive if allowed */ macRxOffRequest(); /* update transmit power in case there was a change */ macRadioUpdateTxPower(); /* * Channel cannot change during transmit so update it here. (Channel *can* change during * a receive. The update function resets receive logic and any partially received * frame is purged.) */ macRadioUpdateChannel(); /* return status of transmit via callback function */ macTxCompleteCallback(status); }
/*================================================================================================= * @fn txComplete * * @brief Transmit has completed. Perform needed maintenance and return status of * the transmit via callback function. * * @param status - status of the transmit that just went out * * @return none *================================================================================================= */ static void txComplete(uint8 status) { /* reset the retransmit flag */ txRetransmitFlag = 0; /* update tx state; turn off receiver if nothing is keeping it on */ macTxActive = MAC_TX_ACTIVE_NO_ACTIVITY; /* turn off receive if allowed */ macRxOffRequest(); /* update transmit power in case there was a change */ macRadioUpdateTxPower(); /* * Channel cannot change during transmit so update it here. (Channel *can* change during * a receive. The update function resets receive logic and any partially received * frame is purged.) */ macRadioUpdateChannel(); /* return status of transmit via callback function */ macTxCompleteCallback(status); }