### Xilinx Processor IP Library

<hl>Software Drivers</hl>

Main Page | Data Structures | File List | Data Fields | Globals

# xuartns550_sinit.c File Reference

## Detailed Description

The implementation of the XUartNs550 component's static initialzation functionality.

     MODIFICATION HISTORY:

     Ver   Who  Date	 Changes
     ----- ---- -------- -----------------------------------------------
     1.01a jvb  10/13/05 First release
     1.11a sv   03/20/07 Updated to use the new coding guidelines.

## Functions

XUartNs550_Config * | XUartNs550_LookupConfig (u16 DeviceId)
int | XUartNs550_Initialize (XUartNs550 *InstancePtr, u16 DeviceId)

## Function Documentation

int XUartNs550_Initialize | ( | XUartNs550 * | InstancePtr,
|  | u16 | DeviceId
| ) |

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.

Parameters:

  | InstancePtr | is a pointer to the XUartNs550 instance .
  | 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.

Returns:

- 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.

XUartNs550_Config* XUartNs550_LookupConfig | ( | u16 | DeviceId | ) |

Looks up the device configuration based on the unique device ID. A table contains the configuration info for each device in the system.

Parameters:

  | DeviceId | contains the ID of the device to look up the configuration for.

Returns:
  A pointer to the configuration found or NULL if the specified device ID was not found.

Note:
  None.

Copyright © 1995-2009 Xilinx, Inc. All rights reserved.