if( ev & gSMGR_TxDone_c )
{
Serial_TxQueueMaintenance(&mSerials);
}
/* If the Serial is IDLE and there is data to tx */
if( (mSerials.state == 0) && (mSerials.txQueue[mSerials.txCurrent].dataSize > 0) )
{
(void)Serial_WriteInternal( i );
}
#if gSerialMgrUseSPI_c
/* If the SPI Slave has more data to transmit, restart the transfer */
#if gSerialMgrSlaveDapTxLogicOne_c
if( (GpioReadPinInput(&mSpiMasterDapCfg)) && (mSerials.serialType == gSerialMgrSPIMaster_c) && (0 == mSerials.state) )
#else
if( (!GpioReadPinInput(&mSpiMasterDapCfg)) && (mSerials.serialType == gSerialMgrSPIMaster_c) && (0 == mSerials.state) )
#endif
{
if( (0 == mSerials.txQueue[mSerials.txIn].dataSize) && (NULL == mSerials.txQueue[mSerials.txIn].txCallback) )
{
Serial_SpiSendDummyByte(i);
}
}
#endif
}
#if !defined(FWK_SMALL_RAM_CONFIG)
/* For BareMetal break the while(1) after 1 run */
if (gUseRtos_c == 0)
{
break;
}
#endif
} /* while(1) */
}
#endif