![]() |
uartlite
Vitis Drivers API Documentation
|
Functions | |
| 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... | |
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... | |
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... | |
| #define TEST_BUFFER_SIZE 100 |
Length of the send and receive buffers.
Referenced by UartLiteIntrExample().
| #define XUARTLITE_BASEADDRESS XPAR_XUARTLITE_0_BASEADDR |
UartLite base address.
Referenced by main().
| int main | ( | void | ) |
Calls the UartLite interrupt example.
References UartLiteIntrExample(), and XUARTLITE_BASEADDRESS.
| void RecvHandler | ( | void * | CallBackRef, |
| unsigned int | EventData | ||
| ) |
Handles the receive data interrupt event.
This function is called from an interrupt context such that the amount of processing performed should be minimized. It is called when data is present in the receive FIFO of the UartLite such that the data can be retrieved from the UartLite. The size of the data present in the FIFO is not known when this function is called.
This handler provides an example of how to handle data for the UartLite, but is application specific.
| [in] | CallBackRef | Callback reference from the driver, in this case it is the instance pointer for the UartLite driver. |
| [in] | EventData | Number of bytes sent or received for sent and receive events. |
Referenced by UartLiteIntrExample().
| void SendHandler | ( | void * | CallBackRef, |
| unsigned int | EventData | ||
| ) |
Handles the send complete interrupt event.
This function is called from an interrupt context such that the amount of processing performed should be minimized. It is called when the transmit FIFO of the UartLite is empty and more data can be sent through the UartLite.
This handler provides an example of how to handle data for the UartLite, but is application specific.
| [in] | CallBackRef | Callback reference from the driver. In this case it is the instance pointer for the UartLite driver. |
| [in] | EventData | Number of bytes sent or received for sent and receive events. |
Referenced by UartLiteIntrExample().
| u8 ReceiveBuffer[TEST_BUFFER_SIZE] |
Buffer for receiving data.
Referenced by UartLiteIntrExample(), and XUartLite_ReceiveBuffer().
| u8 SendBuffer[TEST_BUFFER_SIZE] |
Buffer for transmitting data.
Referenced by UartLiteIntrExample(), UartLiteLowLevelExample(), UartLitePolledExample(), and XUartLite_SendBuffer().
| XUartLite UartLite |
The instance of the UartLite Device.