### Xilinx Processor IP Library

<hl>Software Drivers</hl>

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

# xuartns550_l.h File Reference

## Detailed Description

This header file contains identifiers and low-level driver functions (or macros) that can be used to access the device. The user should refer to the hardware device specification for more details of the device operation. High-level driver functions are defined in xuartns550.h.

     MODIFICATION HISTORY:

     Ver   Who  Date	 Changes
     ----- ---- -------- -----------------------------------------------
     1.00b jhl  04/24/02 First release
     1.11a sv   03/20/07 Updated to use the new coding guidelines.
     1.11a rpm  11/13/07 Fixed bug in _mEnableIntr

## Defines

#define | XUartNs550_mReadReg(BaseAddress, RegOffset)
#define | XUartNs550_mWriteReg(BaseAddress, RegOffset, RegisterValue)
#define | XUartNs550_mGetLineStatusReg(BaseAddress)
#define | XUartNs550_mGetLineControlReg(BaseAddress)
#define | XUartNs550_mSetLineControlReg(BaseAddress, RegisterValue)
#define | XUartNs550_mEnableIntr(BaseAddress)
#define | XUartNs550_mDisableIntr(BaseAddress)
#define | XUartNs550_mIsReceiveData(BaseAddress)
#define | XUartNs550_mIsTransmitEmpty(BaseAddress)

## Functions

void | XUartNs550_SendByte (u32 BaseAddress, u8 Data)
u8 | XUartNs550_RecvByte (u32 BaseAddress)
void | XUartNs550_SetBaud (u32 BaseAddress, u32 InputClockHz, u32 BaudRate)

## Define Documentation

#define XUartNs550_mDisableIntr | ( | BaseAddress |  | ) |

Disable the transmit and receive interrupts of the UART.

Parameters:

  | BaseAddress | contains the base address of the device.

Returns:
  None.

Note:
  None.

#define XUartNs550_mEnableIntr | ( | BaseAddress |  | ) |

Enable the transmit and receive interrupts of the UART.

Parameters:

  | BaseAddress | contains the base address of the device.

Returns:
  None.

Note:
  None.

#define XUartNs550_mGetLineControlReg | ( | BaseAddress |  | ) |

Get the UART Line Status Register.

Parameters:

  | BaseAddress | contains the base address of the device.

Returns:
  The value read from the register.

Note:
  None.

#define XUartNs550_mGetLineStatusReg | ( | BaseAddress |  | ) |

Get the UART Line Status Register.

Parameters:

  | BaseAddress | contains the base address of the device.

Returns:
  The value read from the register.

Note:
  None.

#define XUartNs550_mIsReceiveData | ( | BaseAddress |  | ) |

Determine if there is receive data in the receiver and/or FIFO.

Parameters:

  | BaseAddress | contains the base address of the device.

Returns:
  TRUE if there is receive data, FALSE otherwise.

Note:
  None.

#define XUartNs550_mIsTransmitEmpty | ( | BaseAddress |  | ) |

Determine if a byte of data can be sent with the transmitter.

Parameters:

  | BaseAddress | contains the base address of the device.

Returns:
  TRUE if a byte can be sent, FALSE otherwise.

Note:
  None.

#define XUartNs550_mReadReg | ( | BaseAddress,
|  | RegOffset |  | ) |

Read a UART register.

Parameters:

  | BaseAddress | contains the base address of the device.
  | RegOffset | contains the offset from the 1st register of the device to select the specific register.

Returns:
  The value read from the register.

Note:
  None.

#define XUartNs550_mSetLineControlReg | ( | BaseAddress,
|  | RegisterValue |  | ) |

Set the UART Line Status Register.

Parameters:

  | BaseAddress | contains the base address of the device.
  | RegisterValue | is the value to be written to the register.

Returns:
  None.

Note:
  None.

#define XUartNs550_mWriteReg | ( | BaseAddress,
|  | RegOffset,
|  | RegisterValue |  | ) |

Write to a UART register.

Parameters:

  | BaseAddress | contains the base address of the device.
  | RegOffset | contains the offset from the 1st register of the device to select the specific register.

Returns:
  The value read from the register.

Note:
  None.

## Function Documentation

u8 XUartNs550_RecvByte | ( | u32 | BaseAddress | ) |

This function receives a byte from the UART. It operates in a polling mode and blocks until a byte of data is received.

Parameters:

  | BaseAddress | contains the base address of the UART.

Returns:
  The data byte received by the UART.

Note:
  None.

void XUartNs550_SendByte | ( | u32 | BaseAddress,
|  | u8 | Data
| ) |

This function sends a data byte with the UART. This function operates in the polling mode and blocks until the data has been put into the UART transmit holding register.

Parameters:

  | BaseAddress | contains the base address of the UART.
  | Data | contains the data byte to be sent.

Returns:
  None.

Note:
  None.

void XUartNs550_SetBaud | ( | u32 | BaseAddress,
|  | u32 | InputClockHz,
|  | u32 | BaudRate
| ) |

Set the baud rate for the UART.

Parameters:

  | BaseAddress | contains the base address of the UART.
  | InputClockHz | is the frequency of the input clock to the device in Hertz.
  | BaudRate | is the baud rate to be set.

Returns:
  None.

Note:
  None.

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