uartns550
Vitis Drivers API Documentation
 All Data Structures Files Functions Variables Typedefs Groups Pages
xuartns550_hello_world_example.c File Reference

Overview

This file contains a design example using the Uart 16450/550 driver (XUartNs550) and hardware device using polled mode.

Note
None.

MODIFICATION HISTORY:

Ver   Who  Date     Changes


1.00a jhl 05/13/02 First release 1.00a 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 and minor modifications as per coding guidelines. 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. 3.9 gm 07/09/23 Added SDT support 3.13 bkv 07/07/25 Fixed GCC Warnings. 3.14 vlt 12/18/25 Update Doxygen comments to include SDT flow details.

 
#include "xparameters.h"
#include "xuartns550.h"
#include "xil_printf.h"

Functions

int UartNs550HelloWorldExample (UINTPTR BaseAddress)
 This function sends Hello World with the UART 16450/550 device and driver as a design example. More...
 
int main (void)
 Main function to call the example. More...
 

Function Documentation

int main ( void  )

Main function to call the example.

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

References UartNs550HelloWorldExample().

int UartNs550HelloWorldExample ( UINTPTR  BaseAddress)

This function sends Hello World with the UART 16450/550 device and driver as a design example.

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

This function polls the UART and does not require the use of interrupts.

Parameters
BaseAddresscontains the base address of the device
Returns
  • XST_FAILURE if the UART driver could not be initialized successfully.
  • A non-negative number indicating the number of characters sent.
Note
In XSCT/classic flow, DeviceId is used to look up the device configuration.

References XUartNs550_Initialize(), and XUartNs550_Send().

Referenced by main().