uartpsv
Vitis Drivers API Documentation
xuartpsv_polled_example.c File Reference

Overview

This example runs on versal evaluation board (vck190), it sends data and expects to receive the same data through the device using the local loopback mode in polled mode by using XUartPsv driver.

Note
If the device does not work properly, the example may hang.

MODIFICATION HISTORY:

Ver   Who   Date     Changes


1.0 sd 05/23/19 First Release 1.2 rna 01/20/20 Add self test

Functions

int UartPsvPolledExample (u16 DeviceId)
 This function does a minimal test on the UartPsv device and driver as a design example. More...
 
int main (void)
 Main function to call the Uart Polled mode example. More...
 

Function Documentation

int main ( void  )

Main function to call the Uart Polled mode example.

Returns
XST_SUCCESS if successful, XST_FAILURE if unsuccessful
Note
None

References UartPsvPolledExample().

int UartPsvPolledExample ( u16  DeviceId)

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

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

This function does a minimal test on the XUartPs device in polled mode. This function sends data and expects to receive the same data through the device using the local loopback mode.

Parameters
DeviceIdis the device Id of the UART device and is typically XPAR_<UartPsv_instance>_DEVICE_ID value from xparameters.h.
Returns
XST_SUCCESS if successful, otherwise XST_FAILURE.
Note
This function polls the UART, it may hang if the hardware is not working correctly.

References XUartPsv_Config::BaseAddress, XUartPsv::Config, XUartPsv_CfgInitialize(), XUartPsv_IsTransmitbusy, XUartPsv_LookupConfig(), XUARTPSV_OPER_MODE_LOCAL_LOOP, XUARTPSV_OPER_MODE_NORMAL, XUartPsv_Recv(), XUartPsv_SelfTest(), XUartPsv_Send(), and XUartPsv_SetOperMode().

Referenced by main().