/* Master finish up a transfer. It would call back if there is callback function and set the state to idle. This is not a public API.  */
static void LPSPI_MasterTransferComplete(LPSPI_Type *base, lpspi_master_handle_t *handle)
/* Master finish up a transfer. It would call back if there is callback function and set the state to idle. This is not a public API.  */
static void LPSPI_MasterTransferComplete(LPSPI_Type *base, lpspi_master_handle_t *handle)
{
    assert(handle);
    LPSPI_DisableInterrupts(base, kLPSPI_AllInterruptEnable);
    handle->state = kLPSPI_Idle;
    if (handle->callback)
    {
        handle->callback(base, handle, kStatus_Success, handle->userData);
    }
}