/* param base PDM base pointer. param handle PDM eDMA handle pointer. param base PDM peripheral base address. param callback Pointer to user callback function. param userData User parameter passed to the callback function. param dmaHandle eDMA handle pointer, this handle shall be static allocated by users.  */
void PDM_TransferCreateHandleEDMA(PDM_Type *base, pdm_edma_handle_t *handle, pdm_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)
/* param base PDM base pointer. param handle PDM eDMA handle pointer. param base PDM peripheral base address. param callback Pointer to user callback function. param userData User parameter passed to the callback function. param dmaHandle eDMA handle pointer, this handle shall be static allocated by users.  */
void PDM_TransferCreateHandleEDMA(PDM_Type *base, pdm_edma_handle_t *handle, pdm_edma_callback_t callback, void *userData, edma_handle_t *dmaHandle)
{
    assert((handle != NULL) && (dmaHandle != NULL));
    uint32_t instance = PDM_GetInstance(base);
    (void)memset(handle, 0, sizeof(*handle));
    handle->dmaHandle = dmaHandle;
    handle->callback  = callback;
    handle->userData  = userData;
    handle->state = (uint32_t)kPDM_Idle;
    s_edmaPrivateHandle[instance].base   = base;
    s_edmaPrivateHandle[instance].handle = handle;
    EDMA_SetCallback(dmaHandle, PDM_EDMACallback, &s_edmaPrivateHandle[instance]);
}