/* param base FLEXSPI peripheral base address param handle Pointer to flexspi_dma_handle_t structure param callback FLEXSPI callback, NULL means no callback. param userData User callback function data. param txDmaHandle User requested DMA handle for TX DMA transfer. param rxDmaHandle User requested DMA handle for RX DMA transfer.  */
void FLEXSPI_TransferCreateHandleDMA(FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_dma_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle)
/* param base FLEXSPI peripheral base address param handle Pointer to flexspi_dma_handle_t structure param callback FLEXSPI callback, NULL means no callback. param userData User callback function data. param txDmaHandle User requested DMA handle for TX DMA transfer. param rxDmaHandle User requested DMA handle for RX DMA transfer.  */
void FLEXSPI_TransferCreateHandleDMA(FLEXSPI_Type *base, flexspi_dma_handle_t *handle, flexspi_dma_callback_t callback, void *userData, dma_handle_t *txDmaHandle, dma_handle_t *rxDmaHandle)
{
    assert(handle);
    uint32_t instance = FLEXSPI_GetInstance(base);
    s_dmaPrivateHandle[instance].base   = base;
    s_dmaPrivateHandle[instance].handle = handle;
    (void)memset(handle, 0, sizeof(*handle));
    handle->state       = kFLEXSPI_Idle;
    handle->txDmaHandle = txDmaHandle;
    handle->rxDmaHandle = rxDmaHandle;
    handle->nsize       = kFLEXPSI_DMAnSize4Bytes;
    handle->completionCallback = callback;
    handle->userData           = userData;
}