lib/sw_services/xilplmi/src/xplmi_dma.c
int XPlmi_WaitForNonBlkDestDma(u32 DmaFlags)
{
	int Status = XST_FAILURE;
	XPmcDma* PmcDmaPtr = NULL;

	if ((DmaFlags & XPLMI_PMCDMA_0) == XPLMI_PMCDMA_0) {
		PmcDmaPtr = &PmcDma0;
	}
	else {
		PmcDmaPtr = &PmcDma1;
	}

	Status = XPmcDma_WaitForDone(PmcDmaPtr, XPMCDMA_DST_CHANNEL);
	if (Status != XST_SUCCESS) {
		Status = XPlmi_UpdateStatus(XPLMI_ERR_NON_BLOCK_DEST_DMA_WAIT,
				Status);
		goto END;
	}

	/* To acknowledge the transfer has completed */
	XPmcDma_IntrClear(PmcDmaPtr, XPMCDMA_DST_CHANNEL, XPMCDMA_IXR_DONE_MASK);
	DmaCtrl.AxiBurstType = 0U;
	XPmcDma_SetConfig(PmcDmaPtr, XPMCDMA_DST_CHANNEL, &DmaCtrl);

END:
	return Status;
}
/*****************************************************************************/
/**
 * @brief	This function is used set wait on non blocking DMA. It is called
 * when Dest DMA is non blocking.
 *
 * @param	DmaFlags to differentiate between PMCDMA_0 and PMCDMA_1
 *
 * @return	XST_SUCCESS on success and error code on failure
 *
 *****************************************************************************/
@brief       This function is used set wait on non blocking DMA. It is called
when Dest DMA is non blocking.



@return      XST_SUCCESS on success and error code on failure
@brief This function is used set wait on non blocking DMA . It is called when Dest DMA is non blocking . @return XST_SUCCESS on success and error code on failure
int XPlmi_WaitForNonBlkDestDma(u32 DmaFlags)
{
	int Status = XST_FAILURE;
	XPmcDma* PmcDmaPtr = NULL;
	if ((DmaFlags & XPLMI_PMCDMA_0) == XPLMI_PMCDMA_0) {
		PmcDmaPtr = &PmcDma0;
	}
	else {
		PmcDmaPtr = &PmcDma1;
	}
	Status = XPmcDma_WaitForDone(PmcDmaPtr, XPMCDMA_DST_CHANNEL);
	if (Status != XST_SUCCESS) {
		Status = XPlmi_UpdateStatus(XPLMI_ERR_NON_BLOCK_DEST_DMA_WAIT,
				Status);
		goto END;
	}
	XPmcDma_IntrClear(PmcDmaPtr, XPMCDMA_DST_CHANNEL, XPMCDMA_IXR_DONE_MASK);
	DmaCtrl.AxiBurstType = 0U;
	XPmcDma_SetConfig(PmcDmaPtr, XPMCDMA_DST_CHANNEL, &DmaCtrl);
END:
	return Status;
}
int XPlmi_WaitForNonBlkDestDma ( u32 DmaFlags ) { int Status = XST_FAILURE ; XPmcDma * PmcDmaPtr = NULL ; if ( ( DmaFlags & XPLMI_PMCDMA_0 ) == XPLMI_PMCDMA_0 ) { PmcDmaPtr = & PmcDma0 ; } else { PmcDmaPtr = & PmcDma1 ; } Status = XPmcDma_WaitForDone ( PmcDmaPtr , XPMCDMA_DST_CHANNEL ) ; if ( Status != XST_SUCCESS ) { Status = XPlmi_UpdateStatus ( XPLMI_ERR_NON_BLOCK_DEST_DMA_WAIT , Status ) ; goto END ; } XPmcDma_IntrClear ( PmcDmaPtr , XPMCDMA_DST_CHANNEL , XPMCDMA_IXR_DONE_MASK ) ; DmaCtrl . AxiBurstType = 0U ; XPmcDma_SetConfig ( PmcDmaPtr , XPMCDMA_DST_CHANNEL , & DmaCtrl ) ; END : return Status ; }
@brief       This function is used set wait on non blocking DMA.
@brief This function is used set wait on non blocking DMA .
/* To acknowledge the transfer has completed */