예제 #1
0
파일: mac_tx.c 프로젝트: LILCMU/WRATIOT
/*=================================================================================================
 * @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();
  }
}