Data Structures | |
struct | XUartLite_Stats |
struct | XUartLite_Buffer |
struct | XUartLite_Config |
struct | XUartLite |
Typedefs | |
typedef void(* | XUartLite_Handler )(void *CallBackRef, unsigned int ByteCount) |
Functions | |
int | XUartLite_Initialize (XUartLite *InstancePtr, u16 DeviceId) |
int | XUartLite_CfgInitialize (XUartLite *InstancePtr, XUartLite_Config *Config, u32 EffectiveAddr) |
void | XUartLite_ResetFifos (XUartLite *InstancePtr) |
unsigned int | XUartLite_Send (XUartLite *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes) |
unsigned int | XUartLite_Recv (XUartLite *InstancePtr, u8 *DataBufferPtr, unsigned int NumBytes) |
int | XUartLite_IsSending (XUartLite *InstancePtr) |
void | XUartLite_GetStats (XUartLite *InstancePtr, XUartLite_Stats *StatsPtr) |
void | XUartLite_ClearStats (XUartLite *InstancePtr) |
int | XUartLite_SelfTest (XUartLite *InstancePtr) |
void | XUartLite_EnableInterrupt (XUartLite *InstancePtr) |
void | XUartLite_DisableInterrupt (XUartLite *InstancePtr) |
void | XUartLite_SetRecvHandler (XUartLite *InstancePtr, XUartLite_Handler FuncPtr, void *CallBackRef) |
void | XUartLite_SetSendHandler (XUartLite *InstancePtr, XUartLite_Handler FuncPtr, void *CallBackRef) |
void | XUartLite_InterruptHandler (XUartLite *InstancePtr) |
|
Callback function. The first argument is a callback reference passed in by the upper layer when setting the callback functions, and passed back to the upper layer when the callback is invoked. The second argument is the ByteCount which is the number of bytes that actually moved from/to the buffer provided in the _Send/_Receive call. |
|
Initialize a XUartLite instance. The receive and transmit FIFOs of the UART are not flushed, so the user may want to flush them. The hardware device does not have any way to disable the receiver such that any valid data may be present in the receive FIFO. This function disables the UART interrupt. The baudrate and format of the data are fixed in the hardware at hardware build time.
|
|
This function zeros the statistics for the given instance.
|
|
This function disables the UART interrupt. After calling this function, data may still be received by the UART but no interrupt will be generated since the hardware device has no way to disable the receiver.
|
|
This function enables the UART interrupt such that an interrupt will occur when data is received or data has been transmitted. The device contains 16 byte receive and transmit FIFOs such that an interrupt is generated anytime there is data in the receive FIFO and when the transmit FIFO transitions from not empty to empty.
|
|
Returns a snapshot of the current statistics in the structure specified.
|
|
Initialize a XUartLite instance. The receive and transmit FIFOs of the UART are not flushed, so the user may want to flush them. The hardware device does not have any way to disable the receiver such that any valid data may be present in the receive FIFO. This function disables the UART interrupt. The baudrate and format of the data are fixed in the hardware at hardware build time.
|
|
This function is the interrupt handler for the UART lite driver. It must be connected to an interrupt system by the user such that it is called when an interrupt for any UART lite occurs. This function does not save or restore the processor context such that the user must ensure this occurs.
|
|
This function determines if the specified UART is sending data. If the transmitter register is not empty, it is sending data.
|
|
This function will attempt to receive a specified number of bytes of data from the UART and store it into the specified buffer. This function is designed for either polled or interrupt driven modes. It is non-blocking such that it will return if no data has already received by the UART. In a polled mode, this function will only receive as much data as the UART can buffer in the FIFO. The application may need to call it repeatedly to receive a buffer. Polled mode is the default mode of operation for the driver. In interrupt mode, this function will start receiving and then the interrupt handler of the driver will continue receiving data until the buffer has been received. A callback function, as specified by the application, will be called to indicate the completion of receiving the buffer or when any receive errors or timeouts occur. Interrupt mode must be enabled using the SetOptions function.
|
|
This function resets the FIFOs, both transmit and receive, of the UART such that they are emptied. Since the UART does not have any way to disable it from receiving data, it may be necessary for the application to reset the FIFOs to get rid of any unwanted data.
|
|
Runs a self-test on the device hardware. Since there is no way to perform a loopback in the hardware, this test can only check the state of the status register to verify it is correct. This test assumes that the hardware device is still in its reset state, but has been initialized with the Initialize function.
|
|
This functions sends the specified buffer of data using the UART in either polled or interrupt driven modes. This function is non-blocking such that it will return before the data has been sent by the UART. If the UART is busy sending data, it will return and indicate zero bytes were sent. In a polled mode, this function will only send as much data as the UART can buffer in the FIFO. The application may need to call it repeatedly to send a buffer. In interrupt mode, this function will start sending the specified buffer and then the interrupt handler of the driver will continue sending data until the buffer has been sent. A callback function, as specified by the application, will be called to indicate the completion of sending the buffer.
|
|
This function sets the handler that will be called when an event (interrupt) occurs in the driver. The purpose of the handler is to allow application specific processing to be performed.
|
|
This function sets the handler that will be called when an event (interrupt) occurs in the driver. The purpose of the handler is to allow application specific processing to be performed.
|
Copyright © 1995-2009 Xilinx, Inc. All rights reserved.