Platform/ECM3532/M3/hw/csp/ecm3532/m3/csp/src/eta_csp_spi.c
/***************************************************************************/
/**
 *
 *  EtaCspSpiProcessIntXmitDone - Process SPI Interrupt for All Transmit/Recieve complete
 *
 *  @param iNum the SPI number.
 *
 ******************************************************************************/
Process SPI Interrupt for All Transmit/Recieve complete
@param iNum the SPI number.
Process SPI Interrupt for All Transmit / Recieve complete @param iNum the SPI number .
tEtaStatus EtaCspSpiProcessIntXmitDone (tSpiNum iNum)
{
  if ((g_pEtaCspSpiCmd[iNum]->bCmdActive == 0) || (g_pEtaCspSpiCmd[iNum]->ui32TxLen != 0) || (g_pEtaCspSpiCmd[iNum]->ui32RxLen != 0))
  {
#ifdef ETA_CSP_SPI_DEBUG
    ETA_DIAGS_PRINTF("ERROR: received spi_xmit_done but command is already done or has work left to do. bCmdActive=%x  ui32TxLen=%x  ui32RxLen=%x\r\n", g_pEtaCspSpiCmd[iNum]->bCmdActive, g_pEtaCspSpiCmd[iNum]->ui32TxLen, g_pEtaCspSpiCmd[iNum]->ui32RxLen);
#endif
    return eEtaSpiCmdSequenceErr;
  }
#ifdef ETA_CSP_SPI_DETAILED_DEBUG
  ETA_DIAGS_PRINTF("DETAILED_SPI:SPI command interrupt xmit complete\r\n");
#endif
  g_pEtaCspSpiCmd[iNum]->bCmdActive = 0;
  g_pEtaCspSpiCmd[iNum]->spiStatus = eEtaSuccess;
  REGN_M1(iNum, SPI_INT_EN, XMIT_COMPLETE_EN0, 0);
  return eEtaSuccess;
}
tEtaStatus EtaCspSpiProcessIntXmitDone ( tSpiNum iNum ) { if ( ( g_pEtaCspSpiCmd [ iNum ] -> bCmdActive == 0 ) || ( g_pEtaCspSpiCmd [ iNum ] -> ui32TxLen != 0 ) || ( g_pEtaCspSpiCmd [ iNum ] -> ui32RxLen != 0 ) ) { #ifdef ETA_CSP_SPI_DEBUG ETA_DIAGS_PRINTF ( " \r \n " , g_pEtaCspSpiCmd [ iNum ] -> bCmdActive , g_pEtaCspSpiCmd [ iNum ] -> ui32TxLen , g_pEtaCspSpiCmd [ iNum ] -> ui32RxLen ) ; #endif return eEtaSpiCmdSequenceErr ; } #ifdef ETA_CSP_SPI_DETAILED_DEBUG ETA_DIAGS_PRINTF ( " \r \n " ) ; #endif g_pEtaCspSpiCmd [ iNum ] -> bCmdActive = 0 ; g_pEtaCspSpiCmd [ iNum ] -> spiStatus = eEtaSuccess ; REGN_M1 ( iNum , SPI_INT_EN , XMIT_COMPLETE_EN0 , 0 ) ; return eEtaSuccess ; }
EtaCspSpiProcessIntXmitDone - Process SPI Interrupt for All Transmit/Recieve complete
  @param iNum the SPI number.
EtaCspSpiProcessIntXmitDone - Process SPI Interrupt for All Transmit / Recieve complete @param iNum the SPI number .