uartlite
Vitis Drivers API Documentation
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.

Functions

int UartLiteIntrExample (INTC *IntcInstancePtr, XUartLite *UartLiteInstPtr, u16 UartLiteDeviceId, u16 UartLiteIntrId)
 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 ( INTC *  IntcInstancePtr,
XUartLite UartLiteInstPtr,
u16  UartLiteDeviceId,
u16  UartLiteIntrId 
)

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
IntcInstancePtris a pointer to the instance of INTC driver.
UartLiteInstPtris a pointer to the instance of UartLite driver.
UartLiteDeviceIdis the Device ID of the UartLite Device and is the XPAR_<UARTLITE_instance>_DEVICE_ID value from xparameters.h.
UartLiteIntrIdis the Interrupt ID and is typically XPAR_<INTC_instance>_<UARTLITE_instance>_VEC_ID value from xparameters.h.
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
None.

This function contains an infinite loop such that if interrupts are not working it may never return.