XilinxProcessorIPLib/drivers/can/src/xcan.c
static void Initialize(XCan *InstancePtr, XCan_Config * ConfigPtr)
{
	/*
	 * Set some default values
	 */
	InstancePtr->IsReady = 0;

	/* Set all handlers to stub values, let user configure this data later
	*/
	InstancePtr->SendHandler = (XCan_SendRecvHandler) StubHandler;
	InstancePtr->RecvHandler = (XCan_SendRecvHandler) StubHandler;
	InstancePtr->ErrorHandler = (XCan_ErrorHandler) StubHandler;
	InstancePtr->EventHandler = (XCan_EventHandler) StubHandler;

	/* Set other field(s) using the configuration structure */
	InstancePtr->NumOfAcceptFilters = ConfigPtr->NumOfAcceptFilters;

	/*
	 * Indicate the component is now ready to use. Note that this is done
	 * before we reset the device below, which may seem a bit odd. The
	 * choice was made to move it here rather than remove the asserts in
	 * various functions (e.g., Reset() and all functions that it calls).
	 * Applications that use multiple threads, one to initialize the XCan
	 * driver and one waiting on the IsReady condition could have a problem
	 * with this sequence.
	 */
	InstancePtr->IsReady = XIL_COMPONENT_IS_READY;

	/*
	 * Reset the device to get it into its initial state. The device will
	 * enter the Configuration Mode immediately after this reset. It is
	 * expected that device configuration by the user will take place after
	 * this reset is done, but before the device is used.
	 */
	XCan_Reset(InstancePtr);
}
/*****************************************************************************/
/**
*
* This function initializes a XCan instance/driver.  This function is utilized
* by XCan_Initialize() or XCan_VmInitialize(), depending on if Virtual Memory
* support is wanted or not.
*
* The initialization entails:
* - Initialize all members of the XCan structure, except BaseAddress.
*   BaseAddress should be taken care of by XCan_Initialize() or
*   XCan_VmInitialize(), before they call this function.
* - Reset the CAN device. The CAN device will enter Configuration Mode
*   immediately after the reset is finished.
*
* @param	InstancePtr is a pointer to the XCan instance to be worked on.
* @param	ConfigPtr points to the a configuration structure the XCan
*		instance should be associated with.
*
* @return	None.
*
* @note		None.
*
******************************************************************************/
This function initializes a XCan instance/driver.  This function is utilized
by XCan_Initialize() or XCan_VmInitialize(), depending on if Virtual Memory
support is wanted or not.

The initialization entails:
Initialize all members of the XCan structure, except BaseAddress.
BaseAddress should be taken care of by XCan_Initialize() or
XCan_VmInitialize(), before they call this function.
Reset the CAN device. The CAN device will enter Configuration Mode
immediately after the reset is finished.
This function initializes a XCan instance / driver . This function is utilized by XCan_Initialize () or XCan_VmInitialize () depending on if Virtual Memory support is wanted or not . The initialization entails : Initialize all members of the XCan structure except BaseAddress . BaseAddress should be taken care of by XCan_Initialize () or XCan_VmInitialize () before they call this function . Reset the CAN device . The CAN device will enter Configuration Mode immediately after the reset is finished .
static void Initialize(XCan *InstancePtr, XCan_Config * ConfigPtr)
{
	InstancePtr->IsReady = 0;
	InstancePtr->SendHandler = (XCan_SendRecvHandler) StubHandler;
	InstancePtr->RecvHandler = (XCan_SendRecvHandler) StubHandler;
	InstancePtr->ErrorHandler = (XCan_ErrorHandler) StubHandler;
	InstancePtr->EventHandler = (XCan_EventHandler) StubHandler;
	InstancePtr->NumOfAcceptFilters = ConfigPtr->NumOfAcceptFilters;
	InstancePtr->IsReady = XIL_COMPONENT_IS_READY;
	XCan_Reset(InstancePtr);
}
static void Initialize ( XCan * InstancePtr , XCan_Config * ConfigPtr ) { InstancePtr -> IsReady = 0 ; InstancePtr -> SendHandler = ( XCan_SendRecvHandler ) StubHandler ; InstancePtr -> RecvHandler = ( XCan_SendRecvHandler ) StubHandler ; InstancePtr -> ErrorHandler = ( XCan_ErrorHandler ) StubHandler ; InstancePtr -> EventHandler = ( XCan_EventHandler ) StubHandler ; InstancePtr -> NumOfAcceptFilters = ConfigPtr -> NumOfAcceptFilters ; InstancePtr -> IsReady = XIL_COMPONENT_IS_READY ; XCan_Reset ( InstancePtr ) ; }
This function initializes a XCan instance/driver.
This function initializes a XCan instance / driver .
/*
	 * Set some default values
	 */ /* Set all handlers to stub values, let user configure this data later
	*/ /* Set other field(s) using the configuration structure */ /*
	 * Indicate the component is now ready to use. Note that this is done
	 * before we reset the device below, which may seem a bit odd. The
	 * choice was made to move it here rather than remove the asserts in
	 * various functions (e.g., Reset() and all functions that it calls).
	 * Applications that use multiple threads, one to initialize the XCan
	 * driver and one waiting on the IsReady condition could have a problem
	 * with this sequence.
	 */ /*
	 * Reset the device to get it into its initial state. The device will
	 * enter the Configuration Mode immediately after this reset. It is
	 * expected that device configuration by the user will take place after
	 * this reset is done, but before the device is used.
	 */