// ----------------------------------------------------------------------------- //! \brief This routine is called from the application context when REM RDY //! is de-asserted //! //! \return void // ----------------------------------------------------------------------------- void NPITLSPI_handleRemRdyEvent(void) { ICall_CSState key; key = ICall_enterCriticalSection(); // If write has not be set up then a read must occur during this // transaction. There is a possibility that after bidirectional // transaction there is an extra MRDY event. This event // could cause a double read (which would clear the RX Buffer) so this // check ignores the MRDY event if Rx is already in progress if (!tlWriteLen && !RxActive) { NPITLSPI_readTransport(); } ICall_leaveCriticalSection(key); }
// ----------------------------------------------------------------------------- //! \brief This routine is called from the application context when MRDY is //! de-asserted //! //! \return void // ----------------------------------------------------------------------------- void NPITLSPI_handleMrdyEvent() { ICall_CSState key; key = ICall_enterCriticalSection(); // If we have not already set up a write then we must be reading // during this transaction. There is a possibility that after // bidirectional transaction there is an extra MRDY event. This event // could cause a double read (which would clear the RX Buffer) so this // check ignores the MRDY event if Rx is already in progress if (!TransportTxBufLen && !RxActive) { NPITLSPI_readTransport(); } ICall_leaveCriticalSection(key); return; }