/* param base LPSPI peripheral address. param handle pointer to lpspi_slave_handle_t structure which stores the transfer state.  */
void LPSPI_SlaveTransferAbort(LPSPI_Type *base, lpspi_slave_handle_t *handle)
/* param base LPSPI peripheral address. param handle pointer to lpspi_slave_handle_t structure which stores the transfer state.  */
void LPSPI_SlaveTransferAbort(LPSPI_Type *base, lpspi_slave_handle_t *handle)
{
    assert(handle);
    LPSPI_DisableInterrupts(base, kLPSPI_TxInterruptEnable | kLPSPI_RxInterruptEnable);
    LPSPI_Reset(base);
    handle->state                = kLPSPI_Idle;
    handle->txRemainingByteCount = 0;
    handle->rxRemainingByteCount = 0;
}