XilinxProcessorIPLib/drivers/uartns550/src/xuartns550_sinit.c
int XUartNs550_Initialize(XUartNs550 *InstancePtr, u16 DeviceId)
{
	XUartNs550_Config *ConfigPtr;

	/*
	 * Assert validates the input arguments
	 */
	Xil_AssertNonvoid(InstancePtr != NULL);

	/*
	 * Lookup the device configuration in the temporary CROM table. Use this
	 * configuration info down below when initializing this component
	 */
	ConfigPtr = XUartNs550_LookupConfig(DeviceId);
	if (ConfigPtr == (XUartNs550_Config *)NULL) {
		return XST_DEVICE_NOT_FOUND;
	}

	ConfigPtr->DefaultBaudRate = XPAR_DEFAULT_BAUD_RATE;
	return XUartNs550_CfgInitialize(InstancePtr, ConfigPtr,
					ConfigPtr->BaseAddress);
}
/****************************************************************************/
/**
*
* Initializes a specific XUartNs550 instance such that it is ready to be used.
* The data format of the device is setup for 8 data bits, 1 stop bit, and no
* parity by default. The baud rate is set to a default value specified by
* XPAR_DEFAULT_BAUD_RATE if the symbol is defined, otherwise it is set to
* 19.2K baud. If the device has FIFOs (16550), they are enabled and the a
* receive FIFO threshold is set for 8 bytes. The default operating mode of the
* driver is polled mode.
*
* @param	InstancePtr is a pointer to the XUartNs550 instance .
* @param	DeviceId is the unique id of the device controlled by this
*		XUartNs550 instance. Passing in a device id associates the
*		generic XUartNs550 instance to a specific device, as chosen
*		by the caller or application developer.
*
* @return
*
* 		- XST_SUCCESS if initialization was successful
* 		- XST_DEVICE_NOT_FOUND if the device ID could not be found in
*		the configuration table
* 		- XST_UART_BAUD_ERROR if the baud rate is not possible because
*		the input clock frequency is not divisible with an acceptable
*		amount of error
*
* @note		None.
*
*****************************************************************************/
Initializes a specific XUartNs550 instance such that it is ready to be used.
The data format of the device is setup for 8 data bits, 1 stop bit, and no
parity by default. The baud rate is set to a default value specified by
XPAR_DEFAULT_BAUD_RATE if the symbol is defined, otherwise it is set to
19.2K baud. If the device has FIFOs (16550), they are enabled and the a
receive FIFO threshold is set for 8 bytes. The default operating mode of the
driver is polled mode.
Initializes a specific XUartNs550 instance such that it is ready to be used . The data format of the device is setup for 8 data bits 1 stop bit and no parity by default . The baud rate is set to a default value specified by XPAR_DEFAULT_BAUD_RATE if the symbol is defined otherwise it is set to 19 . 2K baud . If the device has FIFOs ( 16550 ) they are enabled and the a receive FIFO threshold is set for 8 bytes . The default operating mode of the driver is polled mode .
int XUartNs550_Initialize(XUartNs550 *InstancePtr, u16 DeviceId)
{
	XUartNs550_Config *ConfigPtr;
	Xil_AssertNonvoid(InstancePtr != NULL);
	ConfigPtr = XUartNs550_LookupConfig(DeviceId);
	if (ConfigPtr == (XUartNs550_Config *)NULL) {
		return XST_DEVICE_NOT_FOUND;
	}
	ConfigPtr->DefaultBaudRate = XPAR_DEFAULT_BAUD_RATE;
	return XUartNs550_CfgInitialize(InstancePtr, ConfigPtr,
					ConfigPtr->BaseAddress);
}
int XUartNs550_Initialize ( XUartNs550 * InstancePtr , u16 DeviceId ) { XUartNs550_Config * ConfigPtr ; Xil_AssertNonvoid ( InstancePtr != NULL ) ; ConfigPtr = XUartNs550_LookupConfig ( DeviceId ) ; if ( ConfigPtr == ( XUartNs550_Config * ) NULL ) { return XST_DEVICE_NOT_FOUND ; } ConfigPtr -> DefaultBaudRate = XPAR_DEFAULT_BAUD_RATE ; return XUartNs550_CfgInitialize ( InstancePtr , ConfigPtr , ConfigPtr -> BaseAddress ) ; }
Initializes a specific XUartNs550 instance such that it is ready to be used.
Initializes a specific XUartNs550 instance such that it is ready to be used .
/*
	 * Assert validates the input arguments
	 */ /*
	 * Lookup the device configuration in the temporary CROM table. Use this
	 * configuration info down below when initializing this component
	 */