XilinxProcessorIPLib/drivers/dpdma/src/xdpdma.c
static int XDpDma_WaitPendingTransaction(XDpDma *InstancePtr, u8 ChannelNum)
{
	/* Verify arguments. */
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(ChannelNum <= XDPDMA_AUDIO_CHANNEL1);

	u32 Timeout = 0;
	u32 Count;
	do {
		Count = XDpDma_GetPendingTransaction(InstancePtr, ChannelNum);
		Timeout++;
	} while ((Timeout != XDPDMA_WAIT_TIMEOUT) && (Count != 0U));

	if(Timeout ==  XDPDMA_WAIT_TIMEOUT) {
		return (int)XST_FAILURE;
	}

	return (int)XST_SUCCESS;
}
/*************************************************************************/
/**
 *
 * This function waits until the outstanding transactions are completed.
 *
 * @param    InstancePtr is a pointer to the driver instance.
 * @param    ChannelNum is the channel number on which the operation is
 *	     being carried out.
 *
 * @return   XST_SUCCESS when all the pending transactions are complete
 *	     before timeout.
 *	     XST_FAILURE if timeout occurs before pending transactions are
 *	     completed.
 *
 * @note     None.
 *
 * **************************************************************************/
This function waits until the outstanding transactions are completed.
@param    InstancePtr is a pointer to the driver instance.
@param    ChannelNum is the channel number on which the operation is
being carried out.

@return   XST_SUCCESS when all the pending transactions are complete
before timeout.
XST_FAILURE if timeout occurs before pending transactions are
completed.

@note     None.
This function waits until the outstanding transactions are completed . @param InstancePtr is a pointer to the driver instance . @param ChannelNum is the channel number on which the operation is being carried out . @return XST_SUCCESS when all the pending transactions are complete before timeout . XST_FAILURE if timeout occurs before pending transactions are completed . @note None .
static int XDpDma_WaitPendingTransaction(XDpDma *InstancePtr, u8 ChannelNum)
{
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(ChannelNum <= XDPDMA_AUDIO_CHANNEL1);
	u32 Timeout = 0;
	u32 Count;
	do {
		Count = XDpDma_GetPendingTransaction(InstancePtr, ChannelNum);
		Timeout++;
	} while ((Timeout != XDPDMA_WAIT_TIMEOUT) && (Count != 0U));
	if(Timeout ==  XDPDMA_WAIT_TIMEOUT) {
		return (int)XST_FAILURE;
	}
	return (int)XST_SUCCESS;
}
static int XDpDma_WaitPendingTransaction ( XDpDma * InstancePtr , u8 ChannelNum ) { Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( ChannelNum <= XDPDMA_AUDIO_CHANNEL1 ) ; u32 Timeout = 0 ; u32 Count ; do { Count = XDpDma_GetPendingTransaction ( InstancePtr , ChannelNum ) ; Timeout ++ ; } while ( ( Timeout != XDPDMA_WAIT_TIMEOUT ) && ( Count != 0U ) ) ; if ( Timeout == XDPDMA_WAIT_TIMEOUT ) { return ( int ) XST_FAILURE ; } return ( int ) XST_SUCCESS ; }
This function waits until the outstanding transactions are completed.
This function waits until the outstanding transactions are completed .
/* Verify arguments. */