XilinxProcessorIPLib/drivers/rgb2ycrcb/src/xrgb2ycrcb.c
int XRgb2YCrCb_CfgInitialize(XRgb2YCrCb *InstancePtr,
				XRgb2YCrCb_Config *CfgPtr, u32 EffectiveAddr)
{
	/* Verify arguments. */
	Xil_AssertNonvoid(CfgPtr != NULL);
	Xil_AssertNonvoid(EffectiveAddr != (u32)0x0);

	/* Setup the instance */
	(void)memset((void *)InstancePtr, 0, sizeof(XRgb2YCrCb));
	(void)memcpy((void *)&(InstancePtr->Config), (const void *)CfgPtr,
			sizeof(XRgb2YCrCb_Config));

	InstancePtr->Config.BaseAddress = EffectiveAddr;

	/* Set all handlers to stub values, let user configure this
	 * data later
	 */
	InstancePtr->ProcStartCallBack =
			(XRgb2YCrCb_CallBack)((void *)StubCallBack);
	InstancePtr->FrameDoneCallBack =
			(XRgb2YCrCb_CallBack)((void *)StubCallBack);
	InstancePtr->ErrCallBack =
			(XRgb2YCrCb_ErrorCallBack)((void *)StubErrCallBack);

	/* Reset the hardware and set the flag to indicate the
	 * driver is ready
	 */
	XRgb2YCrCb_Reset(InstancePtr);
	InstancePtr->IsReady = (u32)(XIL_COMPONENT_IS_READY);

	return (XST_SUCCESS);
}
/*****************************************************************************/
/**
*
* This function initializes the Rgb2YCrCb core. This function must be called
* prior to using the Rgb2YCrCb core. Initialization of the Rgb2YCrCb includes
* setting up the instance data and ensuring the hardware is in a quiescent
* state.
*
* @param	InstancePtr is a pointer to the XRgb2YCrCb instance.
* @param	CfgPtr is a reference to a structure containing information
*		about a specific XRgb2YCrCb driver.
* @param	EffectiveAddr is the core base address in the virtual memory
*		address space. The caller is responsible for keeping the
*		address mapping from EffectiveAddr to the core physical
*		base address unchanged once this function is invoked.
*		Unexpected errors may occur if the address mapping changes
*		after this function is called. If address translation is not
*		used, pass in the physical address instead.
*
* @return	- XST_SUCCESS if initialization was successful.
*
* @note		None.
*
******************************************************************************/
This function initializes the Rgb2YCrCb core. This function must be called
prior to using the Rgb2YCrCb core. Initialization of the Rgb2YCrCb includes
setting up the instance data and ensuring the hardware is in a quiescent
state.
This function initializes the Rgb2YCrCb core . This function must be called prior to using the Rgb2YCrCb core . Initialization of the Rgb2YCrCb includes setting up the instance data and ensuring the hardware is in a quiescent state .
int XRgb2YCrCb_CfgInitialize(XRgb2YCrCb *InstancePtr,
				XRgb2YCrCb_Config *CfgPtr, u32 EffectiveAddr)
{
	Xil_AssertNonvoid(CfgPtr != NULL);
	Xil_AssertNonvoid(EffectiveAddr != (u32)0x0);
	(void)memset((void *)InstancePtr, 0, sizeof(XRgb2YCrCb));
	(void)memcpy((void *)&(InstancePtr->Config), (const void *)CfgPtr,
			sizeof(XRgb2YCrCb_Config));
	InstancePtr->Config.BaseAddress = EffectiveAddr;
	InstancePtr->ProcStartCallBack =
			(XRgb2YCrCb_CallBack)((void *)StubCallBack);
	InstancePtr->FrameDoneCallBack =
			(XRgb2YCrCb_CallBack)((void *)StubCallBack);
	InstancePtr->ErrCallBack =
			(XRgb2YCrCb_ErrorCallBack)((void *)StubErrCallBack);
	XRgb2YCrCb_Reset(InstancePtr);
	InstancePtr->IsReady = (u32)(XIL_COMPONENT_IS_READY);
	return (XST_SUCCESS);
}
int XRgb2YCrCb_CfgInitialize ( XRgb2YCrCb * InstancePtr , XRgb2YCrCb_Config * CfgPtr , u32 EffectiveAddr ) { Xil_AssertNonvoid ( CfgPtr != NULL ) ; Xil_AssertNonvoid ( EffectiveAddr != ( u32 ) 0x0 ) ; ( void ) memset ( ( void * ) InstancePtr , 0 , sizeof ( XRgb2YCrCb ) ) ; ( void ) memcpy ( ( void * ) & ( InstancePtr -> Config ) , ( const void * ) CfgPtr , sizeof ( XRgb2YCrCb_Config ) ) ; InstancePtr -> Config . BaseAddress = EffectiveAddr ; InstancePtr -> ProcStartCallBack = ( XRgb2YCrCb_CallBack ) ( ( void * ) StubCallBack ) ; InstancePtr -> FrameDoneCallBack = ( XRgb2YCrCb_CallBack ) ( ( void * ) StubCallBack ) ; InstancePtr -> ErrCallBack = ( XRgb2YCrCb_ErrorCallBack ) ( ( void * ) StubErrCallBack ) ; XRgb2YCrCb_Reset ( InstancePtr ) ; InstancePtr -> IsReady = ( u32 ) ( XIL_COMPONENT_IS_READY ) ; return ( XST_SUCCESS ) ; }
This function initializes the Rgb2YCrCb core.
This function initializes the Rgb2YCrCb core .
/* Verify arguments. */ /* Setup the instance */ /* Set all handlers to stub values, let user configure this
	 * data later
	 */ /* Reset the hardware and set the flag to indicate the
	 * driver is ready
	 */