Exemplo n.º 1
0
/*=================================================================================================
 * @fn          rxPostRxUpdates
 *
 * @brief       Updates that need to be performed once receive is complete.
 *
 *              It is not fatal to execute this function if somehow receive is active.  Under
 *              certain timing/interrupt conditions a new receive may have started before this
 *              function executes.  This should happen very rarely (if it happens at all) and
 *              would cause no problems.
 *
 * @param       none
 *
 * @return      none
 *=================================================================================================
 */
static void rxPostRxUpdates(void)
{
  /* turn off receiver if permitted */
  macRxOffRequest();

  /* update the transmit power, update may have been blocked by transmit of outgoing ACK */
  macRadioUpdateTxPower();

  /* initiate and transmit that was queued during receive */
  macTxStartQueuedFrame();
}
Exemplo n.º 2
0
/*=================================================================================================
 * @fn          txAckIsrTimeout
 *
 * @brief       Timeout for ACK Done ISR interrupt. This would be invoked in case ACK done is not fired within 1 ms
 *
 * @param       none
 *
 * @return      none
 *=================================================================================================
 */
static void txAckIsrTimeout(uint8 event)
{
  (void)event;
  
  if ( macRxOutgoingAckFlag == MAC_RX_FLAG_ACK_REQUEST )
  {
    MAC_RADIO_CANCEL_ACK_TX_DONE_CALLBACK();
    macRxOutgoingAckFlag = 0;
  
    if ( macTxActive == MAC_TX_ACTIVE_QUEUED && !macRxActive )
    {
      macTxStartQueuedFrame();
    }
  }

  macTimerCancel(&macTxAckIsrTimer);
}