![]() |
uartns550
Vitis Drivers API Documentation
|
Data Structures | |
| struct | XUartNs550_Config |
| Contains configuration information for the device. More... | |
| struct | XUartNs550Buffer |
| Manages buffers for sending and receiving data in interrupt mode. More... | |
| struct | XUartNs550Format |
| Holds the data format settings for the device. More... | |
| struct | XUartNs550Stats |
| UART statistics counters. More... | |
| struct | XUartNs550 |
| XUartNs550 driver instance data. More... | |
Macros | |
| #define | XUartNs550_UpdateStats(InstancePtr, CurrentLsr) |
| Updates the status based upon a specified line status register value. More... | |
Baud rate limits | |
Maximum and minimum baud rates based on testing. The hardware is capable of other baud rates. | |
| #define | XUN_NS16550_MAX_RATE 115200 |
| Maximum baud rate. More... | |
| #define | XUN_NS16550_MIN_RATE 300 |
| Minimum baud rate. More... | |
Configuration options | |
These constants specify the options that may be set or retrieved with the driver, each is a unique bit mask such that multiple options may be specified. These constants indicate the function of the option when in the active state. | |
| #define | XUN_OPTION_RXLINE_INTR 0x0800 |
| Enable status interrupt. More... | |
| #define | XUN_OPTION_SET_BREAK 0x0400 |
| Set a break condition. More... | |
| #define | XUN_OPTION_LOOPBACK 0x0200 |
| Enable local loopback. More... | |
| #define | XUN_OPTION_DATA_INTR 0x0100 |
| Enable data interrupts. More... | |
| #define | XUN_OPTION_MODEM_INTR 0x0080 |
| Enable modem interrupts. More... | |
| #define | XUN_OPTION_FIFOS_ENABLE 0x0040 |
| Enable FIFOs. More... | |
| #define | XUN_OPTION_RESET_TX_FIFO 0x0020 |
| Reset the transmit FIFO. More... | |
| #define | XUN_OPTION_RESET_RX_FIFO 0x0010 |
| Reset the receive FIFO. More... | |
| #define | XUN_OPTION_ASSERT_OUT2 0x0008 |
| Assert out2 signal. More... | |
| #define | XUN_OPTION_ASSERT_OUT1 0x0004 |
| Assert out1 signal. More... | |
| #define | XUN_OPTION_ASSERT_RTS 0x0002 |
| Assert RTS signal. More... | |
| #define | XUN_OPTION_ASSERT_DTR 0x0001 |
| Assert DTR signal. More... | |
Data format values | |
These constants specify the data format that may be set or retrieved with the driver. The data format includes the number of data bits, the number of stop bits and parity. | |
| #define | XUN_FORMAT_8_BITS 3 |
| 8 data bits More... | |
| #define | XUN_FORMAT_7_BITS 2 |
| 7 data bits More... | |
| #define | XUN_FORMAT_6_BITS 1 |
| 6 data bits More... | |
| #define | XUN_FORMAT_5_BITS 0 |
| 5 data bits More... | |
| #define | XUN_FORMAT_EVEN_PARITY 2 |
| Even Parity. More... | |
| #define | XUN_FORMAT_ODD_PARITY 1 |
| Odd Parity. More... | |
| #define | XUN_FORMAT_NO_PARITY 0 |
| No Parity. More... | |
| #define | XUN_FORMAT_2_STOP_BIT 1 |
| 2 stop bits More... | |
| #define | XUN_FORMAT_1_STOP_BIT 0 |
| 1 stop bit More... | |
FIFO trigger values | |
These constants specify receive FIFO trigger levels which specify the number of bytes at which a receive data event (interrupt) occurs. | |
| #define | XUN_FIFO_TRIGGER_14 0xC0 |
| 14 byte trigger level More... | |
| #define | XUN_FIFO_TRIGGER_08 0x80 |
| 8 byte trigger level More... | |
| #define | XUN_FIFO_TRIGGER_04 0x40 |
| 4 byte trigger level More... | |
| #define | XUN_FIFO_TRIGGER_01 0x00 |
| 1 byte trigger level More... | |
Modem status values | |
These constants specify the modem status that may be retrieved from the driver. | |
| #define | XUN_MODEM_DCD_DELTA_MASK 0x08 |
| DCD signal changed state. More... | |
| #define | XUN_MODEM_DSR_DELTA_MASK 0x02 |
| DSR signal changed state. More... | |
| #define | XUN_MODEM_CTS_DELTA_MASK 0x01 |
| CTS signal changed state. More... | |
| #define | XUN_MODEM_RINGING_MASK 0x40 |
| Ring signal is active. More... | |
| #define | XUN_MODEM_DSR_MASK 0x20 |
| Current state of DSR signal. More... | |
| #define | XUN_MODEM_CTS_MASK 0x10 |
| Current state of CTS signal. More... | |
| #define | XUN_MODEM_DCD_MASK 0x80 |
| Current state of DCD signal. More... | |
| #define | XUN_MODEM_RING_STOP_MASK 0x04 |
| Ringing has stopped. More... | |
Callback events | |
These constants specify the handler events that are passed to a handler from the driver. These constants are not bit masks such that only one is passed at a time to the handler. | |
| #define | XUN_EVENT_RECV_DATA 1 |
| Data has been received. More... | |
| #define | XUN_EVENT_RECV_TIMEOUT 2 |
| A receive timeout occurred. More... | |
| #define | XUN_EVENT_SENT_DATA 3 |
| Data has been sent. More... | |
| #define | XUN_EVENT_RECV_ERROR 4 |
| A receive error was detected. More... | |
| #define | XUN_EVENT_MODEM 5 |
| A change in modem status. More... | |
Error values | |
These constants specify the errors that may be retrieved from the driver using the XUartNs550_GetLastErrors function. All of them are bit masks, except no error, such that multiple errors may be specified. | |
| #define | XUN_ERROR_BREAK_MASK 0x10 |
| Break detected. More... | |
| #define | XUN_ERROR_FRAMING_MASK 0x08 |
| Receive framing error. More... | |
| #define | XUN_ERROR_PARITY_MASK 0x04 |
| Receive parity error. More... | |
| #define | XUN_ERROR_OVERRUN_MASK 0x02 |
| Receive overrun error. More... | |
| #define | XUN_ERROR_NONE 0x00 |
| No error. More... | |
Typedefs | |
| typedef void(* | XUartNs550_Handler )(void *CallBackRef, u32 Event, unsigned int EventData) |
| Defines the handler that the application must define when using interrupt mode. More... | |
Functions | |
| int | XUartNs550_Initialize (XUartNs550 *InstancePtr, UINTPTR BaseAddress) |
| Initializes a specific XUartNs550 instance for use. More... | |
| XUartNs550_Config * | XUartNs550_LookupConfig (UINTPTR BaseAddress) |
| Looks up the device configuration based on the unique device ID or base address. More... | |
| int | XUartNs550_CfgInitialize (XUartNs550 *InstancePtr, XUartNs550_Config *Config, UINTPTR EffectiveAddr) |
| Initializes a specific XUartNs550 instance for use. More... | |
| unsigned int | XUartNs550_Send (XUartNs550 *InstancePtr, u8 *BufferPtr, unsigned int NumBytes) |
| Sends the specified buffer of data using the UART. More... | |
| unsigned int | XUartNs550_Recv (XUartNs550 *InstancePtr, u8 *BufferPtr, unsigned int NumBytes) |
| Attempts to receive a specified number of bytes of data from the UART. More... | |
| int | XUartNs550_SetOptions (XUartNs550 *InstancePtr, u16 Options) |
| Sets the options for the specified driver instance. More... | |
| u16 | XUartNs550_GetOptions (XUartNs550 *InstancePtr) |
| Gets the options for the specified driver instance. More... | |
| int | XUartNs550_SetFifoThreshold (XUartNs550 *InstancePtr, u8 TriggerLevel) |
| Sets the receive FIFO trigger level. More... | |
| u8 | XUartNs550_GetFifoThreshold (XUartNs550 *InstancePtr) |
| Gets the receive FIFO trigger level. More... | |
| int | XUartNs550_IsSending (XUartNs550 *InstancePtr) |
| Determines if the specified UART is sending data. More... | |
| u8 | XUartNs550_GetLastErrors (XUartNs550 *InstancePtr) |
| Returns the last errors that have occurred in the specified UART. More... | |
| u8 | XUartNs550_GetModemStatus (XUartNs550 *InstancePtr) |
| Gets the modem status from the specified UART. More... | |
| int | XUartNs550_SetDataFormat (XUartNs550 *InstancePtr, XUartNs550Format *FormatPtr) |
| Sets the data format for the specified UART. More... | |
| void | XUartNs550_GetDataFormat (XUartNs550 *InstancePtr, XUartNs550Format *FormatPtr) |
| Gets the data format for the specified UART. More... | |
| void | XUartNs550_SetHandler (XUartNs550 *InstancePtr, XUartNs550_Handler FuncPtr, void *CallBackRef) |
| Sets the handler that the driver calls on an event (interrupt). More... | |
| void | XUartNs550_InterruptHandler (XUartNs550 *InstancePtr) |
| Handles interrupts for the 16450/16550 UART driver. More... | |
| void | XUartNs550_GetStats (XUartNs550 *InstancePtr, XUartNs550Stats *StatsPtr) |
| Returns a snapshot of the current statistics in the area provided. More... | |
| void | XUartNs550_ClearStats (XUartNs550 *InstancePtr) |
| Zeros the statistics for the given instance. More... | |
| int | XUartNs550_SelfTest (XUartNs550 *InstancePtr) |
| Runs a self-test on the driver and hardware device. More... | |