uartns550: xuartns550_low_level_example.c File Reference

| uartns550 Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List
- Examples

Functions
xuartns550_low_level_example.c File Reference

## Overview

This file contains a design example using the low-level driver functions and macros of the UART NS550 driver.

Note
  None.

MODIFICATION HISTORY:

    Ver   Who  Date     Changes

    1.00b rpm  04/25/02 First release
    1.00b sv   06/08/05 Minor changes to comply to Doxygen and coding guidelines
    2.00a ktn  10/20/09 Updated to use HAL processor APIs, minor modifications
                  as per coding guidelines and macros have been renamed to
                  remove _m from the name.
    3.4   ms   01/23/17 Added xil_printf statement in main function to
                        ensure that "Successfully ran" and "Failed" strings
                        are available in all examples. This is a fix for
                        CR-965028.

## Functions
int | XUartNs550_LowLevelExample (u32 UartBaseAddress)
| This function does a minimal test on the UART device using the low-level driver macros and functions. More...
int | main (void)
| Main function to call the example. More...

## Function Documentation

int main | ( | void |  | ) |

Main function to call the example.

Parameters

  None. |

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful.

Note
  None.

References XUartNs550_LowLevelExample().

int XUartNs550_LowLevelExample | ( | u32 | UartBaseAddress | ) |

This function does a minimal test on the UART device using the low-level driver macros and functions.

This function sends data and expects to receive the data through the UART. A physical loopback must be done by the user with the tranmit and receive signals of the UART.

Parameters

  UartBaseAddress | is the base address of the UARTNS550 device and is the XPAR_<UARTNS550_instance>_BASEADDR value from xparameters.h.

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful.

Note
  None.

References XUartNs550_RecvByte(), XUartNs550_SendByte(), XUartNs550_SetBaud(), XUartNs550_SetLineControlReg, XUartNs550_WriteReg, XUN_FCR_OFFSET, XUN_FIFO_ENABLE, and XUN_LCR_8_DATA_BITS.

Referenced by main().