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

Overview

This file contains a design example using the UartLite driver and hardware device using the interrupt mode for transmission of data.

Note

None.

MODIFICATION HISTORY:
Ver   Who  Date  Changes


1.00b sv 06/08/06 Created for supporting Test App Interrupt examples 2.00a ktn 10/20/09 Updated to use HAL Processor APIs and minor changes for coding guidelnes. 2.01a ssb 01/11/01 Updated the example to be used with the SCUGIC in Zynq. 3.2 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/08/23 Added SDT support 3.9 gm 09/05/23 Corrected SDT support checks. 3.12 bkv 07/07/25 Fixed GCC Warnings. 3.13 vlt 12/18/25 Update Doxygen comments to include SDT flow details.

 
#include "xparameters.h"
#include "xuartlite.h"
#include "xil_exception.h"
#include <stdio.h>
#include "xil_printf.h"
#include "xinterrupt_wrap.h"

Functions

int UartLiteIntrExample (XUartLite *UartLiteInstPtr, UINTPTR BaseAddress)
 This function does a minimal test on the UartLite device and driver as a design example. More...
 
int main (void)
 Main function to call the UartLite interrupt example. More...
 

Function Documentation

int main ( void  )

Main function to call the UartLite interrupt example.

Returns
XST_SUCCESS if successful, else XST_FAILURE.
Note
None.

References UartLiteIntrExample().

int UartLiteIntrExample ( XUartLite UartLiteInstPtr,
UINTPTR  BaseAddress 
)

This function does a minimal test on the UartLite device and driver as a design example.

The purpose of this function is to illustrate how to use the XUartLite component.

This function sends data through the UartLite.

This function uses the interrupt driver mode of the UartLite. The calls to the UartLite driver in the interrupt handlers, should only use the non-blocking calls.

Parameters
UartLiteInstPtris a pointer to the instance of UartLite driver.
BaseAddresscontains the base address of the device
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
- In XSCT/classic flow, DeviceId is used to look up the device configuration.
  • This function contains an infinite loop such that if interrupts are not working it may never return.