![]() |
uartlite
Vitis Drivers API Documentation
|
Demonstrates the UartLite driver in interrupt mode.
MODIFICATION HISTORY:
Ver Who Date Changes
1.00a jhl 02/13/02 First release 1.00b rpm 10/01/03 Made XIntc declaration global 1.00b sv 06/09/05 Minor changes to comply to Doxygen and coding guidelines 2.00a ktn 10/20/09 Updated to use HAL Processor APIs and minor changes for coding guidelnes. 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.12 bkv 07/07/25 Fixed GCC Warnings. 3.13 vlt 12/18/25 Update Doxygen comments to include SDT flow details. 3.14 vn 08/26/26 Fix Doxygen warnings 3.14 vn 09/09/26 Align Doxygen comments with AMD standards
#include "xparameters.h"#include "xuartlite.h"#include "xil_exception.h"#include "xil_printf.h"#include "xinterrupt_wrap.h"Macros | |
Device parameters | |
The following constants map to the XPAR parameters created in the xparameters.h file. They are defined here so that all needed parameters can be changed in one place. | |
| #define | XUARTLITE_BASEADDRESS XPAR_XUARTLITE_0_BASEADDR |
| UartLite base address. More... | |
Buffer size | |
| #define | TEST_BUFFER_SIZE 100 |
| Length of the send and receive buffers. More... | |
Functions | |
| int | UartLiteIntrExample (XUartLite *UartLiteInstPtr, UINTPTR BaseAddress) |
| Performs a minimal test on the UartLite device and driver. More... | |
| void | SendHandler (void *CallBackRef, unsigned int EventData) |
| Handles the send complete interrupt event. More... | |
| void | RecvHandler (void *CallBackRef, unsigned int EventData) |
| Handles the receive data interrupt event. More... | |
| int | main (void) |
| Calls the UartLite interrupt example. More... | |
Variables | |
| XUartLite | UartLite |
| The instance of the UartLite Device. More... | |
Shared example variables | |
The following variables are shared between non-interrupt processing and interrupt processing such that they must be global. The counters are used to determine when the entire buffer has been sent and received. | |
| u8 | SendBuffer [TEST_BUFFER_SIZE] |
| Buffer for transmitting data. More... | |
| u8 | ReceiveBuffer [TEST_BUFFER_SIZE] |
| Buffer for receiving data. More... | |