XilinxProcessorIPLib/drivers/wdtps/src/xwdtps.c
s32 XWdtPs_CfgInitialize(XWdtPs *InstancePtr,
			XWdtPs_Config *ConfigPtr, UINTPTR EffectiveAddress)
{
	s32 Status;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(ConfigPtr != NULL);

	/*
	 * If the device is started, disallow the initialize and return a
	 * status indicating it is started. This allows the user to stop the
	 * device and reinitialize, but prevents a user from inadvertently
	 * initializing.
	 */
	if (InstancePtr->IsStarted == XIL_COMPONENT_IS_STARTED) {
		Status = (s32)XST_DEVICE_IS_STARTED;
	} else {

		/*
		 * Copy configuration into instance.
		 */
		InstancePtr->Config.DeviceId = ConfigPtr->DeviceId;

		/*
		 * Save the base address pointer such that the registers of the block
		 * can be accessed and indicate it has not been started yet.
		 */
		InstancePtr->Config.BaseAddress = EffectiveAddress;
		InstancePtr->IsStarted = 0U;

		/*
		 * Indicate the instance is ready to use, successfully initialized.
		 */
		InstancePtr->IsReady = XIL_COMPONENT_IS_READY;

		Status = (s32)XST_SUCCESS;
	}
	return Status;
}
/****************************************************************************/
/**
*
* Initialize a specific watchdog timer instance/driver. This function
* must be called before other functions of the driver are called.
*
* @param	InstancePtr is a pointer to the XWdtPs instance.
* @param	ConfigPtr is the config structure.
* @param	EffectiveAddress is the base address for the device. It could be
*		a virtual address if address translation is supported in the
*		system, otherwise it is the physical address.
*
* @return
*		- XST_SUCCESS if initialization was successful.
*		- XST_DEVICE_IS_STARTED if the device has already been started.
*
* @note		None.
*
******************************************************************************/
Initialize a specific watchdog timer instance/driver. This function
must be called before other functions of the driver are called.
Initialize a specific watchdog timer instance / driver . This function must be called before other functions of the driver are called .
s32 XWdtPs_CfgInitialize(XWdtPs *InstancePtr,
			XWdtPs_Config *ConfigPtr, UINTPTR EffectiveAddress)
{
	s32 Status;
	Xil_AssertNonvoid(InstancePtr != NULL);
	Xil_AssertNonvoid(ConfigPtr != NULL);
	if (InstancePtr->IsStarted == XIL_COMPONENT_IS_STARTED) {
		Status = (s32)XST_DEVICE_IS_STARTED;
	} else {
		InstancePtr->Config.DeviceId = ConfigPtr->DeviceId;
		InstancePtr->Config.BaseAddress = EffectiveAddress;
		InstancePtr->IsStarted = 0U;
		InstancePtr->IsReady = XIL_COMPONENT_IS_READY;
		Status = (s32)XST_SUCCESS;
	}
	return Status;
}
s32 XWdtPs_CfgInitialize ( XWdtPs * InstancePtr , XWdtPs_Config * ConfigPtr , UINTPTR EffectiveAddress ) { s32 Status ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; Xil_AssertNonvoid ( ConfigPtr != NULL ) ; if ( InstancePtr -> IsStarted == XIL_COMPONENT_IS_STARTED ) { Status = ( s32 ) XST_DEVICE_IS_STARTED ; } else { InstancePtr -> Config . DeviceId = ConfigPtr -> DeviceId ; InstancePtr -> Config . BaseAddress = EffectiveAddress ; InstancePtr -> IsStarted = 0U ; InstancePtr -> IsReady = XIL_COMPONENT_IS_READY ; Status = ( s32 ) XST_SUCCESS ; } return Status ; }
Initialize a specific watchdog timer instance/driver.
Initialize a specific watchdog timer instance / driver .
/*
	 * If the device is started, disallow the initialize and return a
	 * status indicating it is started. This allows the user to stop the
	 * device and reinitialize, but prevents a user from inadvertently
	 * initializing.
	 */ /*
		 * Copy configuration into instance.
		 */ /*
		 * Save the base address pointer such that the registers of the block
		 * can be accessed and indicate it has not been started yet.
		 */ /*
		 * Indicate the instance is ready to use, successfully initialized.
		 */