XilinxProcessorIPLib/drivers/axicdma/examples/xaxicdma_example_simple_poll.c
static int CheckData(u8 *SrcPtr, u8 *DestPtr, int Length)
{
	int Index;

	/* Invalidate the DestBuffer before receiving the data, in case the
	 * Data Cache is enabled
	 */
	Xil_DCacheInvalidateRange((UINTPTR)DestPtr, Length);

	for (Index = 0; Index < Length; Index++) {
		if ( DestPtr[Index] != SrcPtr[Index]) {
			xdbg_printf(XDBG_DEBUG_ERROR,
			    "Data check failure %d: %x/%x\r\n",
			    Index, DestPtr[Index], SrcPtr[Index]);
			return XST_FAILURE;
		}
	}

	return XST_SUCCESS;
}
/*****************************************************************************/
/*
* This function checks that two buffers have the same data
*
* @param	SrcPtr is the source buffer
* @param	DestPtr is the destination buffer
* @param	Length is the length of the buffer to check
*
* @return
*		- XST_SUCCESS if the two buffer matches
*		- XST_FAILURE otherwise
*
* @note		None.
*
******************************************************************************/
This function checks that two buffers have the same data
This function checks that two buffers have the same data
static int CheckData(u8 *SrcPtr, u8 *DestPtr, int Length)
{
	int Index;
	Xil_DCacheInvalidateRange((UINTPTR)DestPtr, Length);
	for (Index = 0; Index < Length; Index++) {
		if ( DestPtr[Index] != SrcPtr[Index]) {
			xdbg_printf(XDBG_DEBUG_ERROR,
			    "Data check failure %d: %x/%x\r\n",
			    Index, DestPtr[Index], SrcPtr[Index]);
			return XST_FAILURE;
		}
	}
	return XST_SUCCESS;
}
static int CheckData ( u8 * SrcPtr , u8 * DestPtr , int Length ) { int Index ; Xil_DCacheInvalidateRange ( ( UINTPTR ) DestPtr , Length ) ; for ( Index = 0 ; Index < Length ; Index ++ ) { if ( DestPtr [ Index ] != SrcPtr [ Index ] ) { xdbg_printf ( XDBG_DEBUG_ERROR , " \r \n " , Index , DestPtr [ Index ] , SrcPtr [ Index ] ) ; return XST_FAILURE ; } } return XST_SUCCESS ; }
This function checks that two buffers have the same data
This function checks that two buffers have the same data
/* Invalidate the DestBuffer before receiving the data, in case the
	 * Data Cache is enabled
	 */