XilinxProcessorIPLib/drivers/devcfg/src/xdevcfg.c
static u32 XDcfg_PcapReadback(XDcfg *InstancePtr, u32 SourcePtr,
				u32 SrcWordLength, u32 DestPtr,
				u32 DestWordLength)
{
	u32 IntrReg;

	/*
	 * Send READ Frame command to FPGA
	 */
	XDcfg_InitiateDma(InstancePtr, SourcePtr, XDCFG_DMA_INVALID_ADDRESS,
				SrcWordLength, 0);

	/*
	 * Store the enabled interrupts to enable before the actual read
	 * transfer is initiated and Disable all the interrupts temporarily.
	 */
	IntrReg = XDcfg_IntrGetEnabled(InstancePtr);
	XDcfg_IntrDisable(InstancePtr, XDCFG_IXR_ALL_MASK);

	/*
	 * Wait till you get the DMA done for the read command sent
	 */
	 while ((XDcfg_ReadReg(InstancePtr->Config.BaseAddr,
			XDCFG_INT_STS_OFFSET) &
			XDCFG_IXR_D_P_DONE_MASK) !=
			XDCFG_IXR_D_P_DONE_MASK);
	/*
	 * Enable the previously stored Interrupts .
	 */
	XDcfg_IntrEnable(InstancePtr, IntrReg);

	/*
	 * Initiate the DMA write command.
	 */
	XDcfg_InitiateDma(InstancePtr, XDCFG_DMA_INVALID_ADDRESS, (u32)DestPtr,
				0, DestWordLength);

	return XST_SUCCESS;
}
/******************************************************************************/
/**
*
* This function Implements the DMA Read Command. This command is used to
* transfer the image data from FPGA to the external memory.
*
* @param	InstancePtr is a pointer to the XDcfg instance.
* @param	SourcePtr contains a pointer to the source memory where the data
*		is to be transferred from.
* @param	SrcWordLength is the number of words (32 bit) to be transferred
*		for the source transfer.
* @param	DestPtr contains a pointer to the destination memory
*		where the data is to be transferred to.
* @param	DestWordLength is the number of words (32 bit) to be transferred
*		for the Destination transfer.
*
* @return	- XST_INVALID_PARAM if source address/length is invalid.
*		- XST_SUCCESS if DMA transfer initiated properly.
*
* @note		None.
*
****************************************************************************/
This function Implements the DMA Read Command. This command is used to
transfer the image data from FPGA to the external memory.
This function Implements the DMA Read Command . This command is used to transfer the image data from FPGA to the external memory .
static u32 XDcfg_PcapReadback(XDcfg *InstancePtr, u32 SourcePtr,
				u32 SrcWordLength, u32 DestPtr,
				u32 DestWordLength)
{
	u32 IntrReg;
	XDcfg_InitiateDma(InstancePtr, SourcePtr, XDCFG_DMA_INVALID_ADDRESS,
				SrcWordLength, 0);
	IntrReg = XDcfg_IntrGetEnabled(InstancePtr);
	XDcfg_IntrDisable(InstancePtr, XDCFG_IXR_ALL_MASK);
	 while ((XDcfg_ReadReg(InstancePtr->Config.BaseAddr,
			XDCFG_INT_STS_OFFSET) &
			XDCFG_IXR_D_P_DONE_MASK) !=
			XDCFG_IXR_D_P_DONE_MASK);
	XDcfg_IntrEnable(InstancePtr, IntrReg);
	XDcfg_InitiateDma(InstancePtr, XDCFG_DMA_INVALID_ADDRESS, (u32)DestPtr,
				0, DestWordLength);
	return XST_SUCCESS;
}
static u32 XDcfg_PcapReadback ( XDcfg * InstancePtr , u32 SourcePtr , u32 SrcWordLength , u32 DestPtr , u32 DestWordLength ) { u32 IntrReg ; XDcfg_InitiateDma ( InstancePtr , SourcePtr , XDCFG_DMA_INVALID_ADDRESS , SrcWordLength , 0 ) ; IntrReg = XDcfg_IntrGetEnabled ( InstancePtr ) ; XDcfg_IntrDisable ( InstancePtr , XDCFG_IXR_ALL_MASK ) ; while ( ( XDcfg_ReadReg ( InstancePtr -> Config . BaseAddr , XDCFG_INT_STS_OFFSET ) & XDCFG_IXR_D_P_DONE_MASK ) != XDCFG_IXR_D_P_DONE_MASK ) ; XDcfg_IntrEnable ( InstancePtr , IntrReg ) ; XDcfg_InitiateDma ( InstancePtr , XDCFG_DMA_INVALID_ADDRESS , ( u32 ) DestPtr , 0 , DestWordLength ) ; return XST_SUCCESS ; }
This function Implements the DMA Read Command.
This function Implements the DMA Read Command .
/*
	 * Send READ Frame command to FPGA
	 */ /*
	 * Store the enabled interrupts to enable before the actual read
	 * transfer is initiated and Disable all the interrupts temporarily.
	 */ /*
	 * Wait till you get the DMA done for the read command sent
	 */ /*
	 * Enable the previously stored Interrupts .
	 */ /*
	 * Initiate the DMA write command.
	 */