Пример #1
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);
}
Пример #2
0
/**************************************************************************************************
 * @fn          macRxAckTxDoneCallback
 *
 * @brief       Function called when the outoing ACK has completed transmitting.
 *
 * @param       none
 *
 * @return      none
 **************************************************************************************************
 */
void macRxAckTxDoneCallback(void)
{  
  macRxOutgoingAckFlag = 0;

#ifdef ACK_DONE_ISR_WORKAROUND
  macTimerCancel(&macTxAckIsrTimer);
#endif /* ACK_DONE_ISR_WROKAROUND */

  /*
   *  With certain interrupt priorities and timing conditions, it is possible this callback
   *  could be executed before the primary receive logic completes.  To prevent this, the
   *  post updates are only executed if receive logic is no longer active.  In the case the
   *  post updates are not executed here, they will execute when the main receive logic
   *  completes.
   */
  if (!macRxActive)
  {
    rxPostRxUpdates();
  }
}