51static inline u32 Xil_In32(UINTPTR Addr)
53 return *(
volatile u32 *) Addr;
55static inline void Xil_Out32(UINTPTR Addr, u32 Value)
57 volatile u32 *LocalAddr = (
volatile u32 *)Addr;
66#define XPAR_XUARTLITE_USE_DCR_BRIDGE 0
68#if (XPAR_XUARTLITE_USE_DCR_BRIDGE != 0)
77#if (XPAR_XUARTLITE_USE_DCR_BRIDGE != 0)
78#define XUL_RX_FIFO_OFFSET 0
79#define XUL_TX_FIFO_OFFSET 1
80#define XUL_STATUS_REG_OFFSET 2
81#define XUL_CONTROL_REG_OFFSET 3
85#define XUL_RX_FIFO_OFFSET 0
86#define XUL_TX_FIFO_OFFSET 4
87#define XUL_STATUS_REG_OFFSET 8
88#define XUL_CONTROL_REG_OFFSET 12
94#define XUL_CR_ENABLE_INTR 0x10
95#define XUL_CR_FIFO_RX_RESET 0x02
96#define XUL_CR_FIFO_TX_RESET 0x01
100#define XUL_SR_PARITY_ERROR 0x80
101#define XUL_SR_FRAMING_ERROR 0x40
102#define XUL_SR_OVERRUN_ERROR 0x20
103#define XUL_SR_INTR_ENABLED 0x10
104#define XUL_SR_TX_FIFO_FULL 0x08
105#define XUL_SR_TX_FIFO_EMPTY 0x04
106#define XUL_SR_RX_FIFO_FULL 0x02
107#define XUL_SR_RX_FIFO_VALID_DATA 0x01
113#define XUL_FIFO_SIZE 16
118#define XUL_STOP_BITS 1
122#define XUL_PARITY_NONE 0
123#define XUL_PARITY_ODD 1
124#define XUL_PARITY_EVEN 2
133#if (XPAR_XUARTLITE_USE_DCR_BRIDGE != 0)
135#define XUartLite_In32 XIo_DcrIn
136#define XUartLite_Out32 XIo_DcrOut
140#define XUartLite_In32 Xil_In32
141#define XUartLite_Out32 Xil_Out32
162#define XUartLite_WriteReg(BaseAddress, RegOffset, Data) \
163 XUartLite_Out32((BaseAddress) + (RegOffset), (u32)(Data))
179#define XUartLite_ReadReg(BaseAddress, RegOffset) \
180 XUartLite_In32((BaseAddress) + (RegOffset))
198#define XUartLite_SetControlReg(BaseAddress, Mask) \
199 XUartLite_WriteReg((BaseAddress), XUL_CONTROL_REG_OFFSET, (Mask))
216#define XUartLite_GetStatusReg(BaseAddress) \
217 XUartLite_ReadReg((BaseAddress), XUL_STATUS_REG_OFFSET)
233#define XUartLite_IsReceiveEmpty(BaseAddress) \
234 ((XUartLite_GetStatusReg((BaseAddress)) & XUL_SR_RX_FIFO_VALID_DATA) != \
235 XUL_SR_RX_FIFO_VALID_DATA)
251#define XUartLite_IsTransmitEmpty(BaseAddress) \
252 ((XUartLite_GetStatusReg((BaseAddress)) & XUL_SR_TX_FIFO_EMPTY) == \
253 XUL_SR_TX_FIFO_EMPTY)
269#define XUartLite_IsTransmitFull(BaseAddress) \
270 ((XUartLite_GetStatusReg((BaseAddress)) & XUL_SR_TX_FIFO_FULL) == \
287#define XUartLite_IsIntrEnabled(BaseAddress) \
288 ((XUartLite_GetStatusReg((BaseAddress)) & XUL_SR_INTR_ENABLED) == \
307#define XUartLite_EnableIntr(BaseAddress) \
308 XUartLite_SetControlReg((BaseAddress), XUL_CR_ENABLE_INTR)
326#define XUartLite_DisableIntr(BaseAddress) \
327 XUartLite_SetControlReg((BaseAddress), 0)
u8 XUartLite_RecvByte(UINTPTR BaseAddress)
Definition: uartlite_l.c:92
void XUartLite_SendByte(UINTPTR BaseAddress, u8 Data)
Definition: uartlite_l.c:70