/* param base LPSPI peripheral address. param handle pointer to lpspi_master_handle_t structure which stores the transfer state.  */
void LPSPI_MasterTransferAbort(LPSPI_Type *base, lpspi_master_handle_t *handle)
/* param base LPSPI peripheral address. param handle pointer to lpspi_master_handle_t structure which stores the transfer state.  */
void LPSPI_MasterTransferAbort(LPSPI_Type *base, lpspi_master_handle_t *handle)
{
    assert(handle != NULL);
    LPSPI_DisableInterrupts(base, (uint32_t)kLPSPI_AllInterruptEnable);
    LPSPI_Reset(base);
    handle->state                = (uint8_t)kLPSPI_Idle;
    handle->txRemainingByteCount = 0;
    handle->rxRemainingByteCount = 0;
}