uartpsv: xuartpsv_hello_world_example.c File Reference

| uartpsv Xilinx SDK Drivers API Documentation

- Overview
- Data Structures
- APIs
- File List

Functions
xuartpsv_hello_world_example.c File Reference

## Overview

This file contains a design example using the XUartPsv driver in polled mode.

The example uses the default setting in the XUartPsv driver: . baud rate 9600 . 8 bit data . 1 stop bit . no parity

Note
  This example requires an external SchmartModule connected to the pins for the device to display the 'Hello World' message onto a hyper-terminal.

MODIFICATION HISTORY:

    Ver  Who  Date      Changes

    1.0  sg   09/18/17  First Release

## Functions
int | UartPsvHelloWorldExample (u16 DeviceId)
| This function sends 'Hello World' to an external terminal in polled mode. More...
int | main (void)
| Main function to call the Hello World example. More...

## Function Documentation

int main | ( | void |  | ) |

Main function to call the Hello World example.

Parameters

  None |

Returns
  - XST_FAILURE if the Test Failed .
  - A non-negative number indicating the number of characters sent.

Note
  None

References UartPsvHelloWorldExample().

int UartPsvHelloWorldExample | ( | u16 | DeviceId | ) |

This function sends 'Hello World' to an external terminal in polled mode.

The purpose of this function is to illustrate how to use the XUartPsv driver.

Parameters

  DeviceId | is the unique ID for the device from hardware build.

Returns
  - XST_FAILURE if the UART driver could not be initialized successfully.
  - A non-negative number indicating the number of characters sent.

Note
  None.

References XUartPsv_Config::BaseAddress, XUartPsv_CfgInitialize(), XUartPsv_LookupConfig(), and XUartPsv_Send().

Referenced by main().