uartps: xuartps_low_echo_example.c File Reference

| uartps Xilinx SDK Drivers API Documentation

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

Functions
xuartps_low_echo_example.c File Reference

## Overview

This file contains a design example using the hardware interface.

First, certain character sequence is output onto the terminal. Then any characters typed in are echoed back, for letters, cases are switched. An 'ESC' character terminates the execution of the example.

This example requires an external SchmartModule to be connected to the appropriate pins for the device through a daughter board. The test uses the default settings of the device: . baud rate of 9600 . 8 bits data . 1 stop bit . no parity

Note
  The test hangs if communication channel from the user terminal to the device is broken.

MODIFICATION HISTORY:

    Ver   Who    Date     Changes

    1.00a drg/jz 01/13/10 First release
    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 | UartPsEchoExample (u32 UartBaseAddress)
| This function does a minimal test on the UART device using the hardware interface. More...
int | main (void)
| Main function to call the Uart Echo example. More...

## Function Documentation

int main | ( | void |  | ) |

Main function to call the Uart Echo example.

Parameters

  None |

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful

Note
  None

References UartPsEchoExample().

int UartPsEchoExample | ( | u32 | UartBaseAddress | ) |

This function does a minimal test on the UART device using the hardware interface.

Parameters

  UartBaseAddress | is the base address of the device

Returns
  XST_SUCCESS if successful, XST_FAILURE if unsuccessful

Note
  None.

References XUARTPS_CR_EN_DIS_MASK, XUARTPS_CR_OFFSET, XUARTPS_CR_RX_EN, XUARTPS_CR_TX_EN, XUARTPS_FIFO_OFFSET, XUartPs_IsReceiveData, XUartPs_IsTransmitFull, XUartPs_ReadReg, and XUartPs_WriteReg.

Referenced by main().