41#define UART0 UART0_BASE
47#define UART_TASK_STARTRX(uart) MMIO32((uart) + 0x000)
48#define UART_TASK_STOPRX(uart) MMIO32((uart) + 0x004)
49#define UART_TASK_STARTTX(uart) MMIO32((uart) + 0x008)
50#define UART_TASK_STOPTX(uart) MMIO32((uart) + 0x00C)
51#define UART_TASK_SUSPEND(uart) MMIO32((uart) + 0x01C)
55#define UART_EVENT_CTS(uart) MMIO32((uart) + 0x100)
56#define UART_EVENT_NCTS(uart) MMIO32((uart) + 0x104)
57#define UART_EVENT_RXDRDY(uart) MMIO32((uart) + 0x108)
58#define UART_EVENT_TXDRDY(uart) MMIO32((uart) + 0x11C)
59#define UART_EVENT_ERROR(uart) MMIO32((uart) + 0x124)
60#define UART_EVENT_RXTO(uart) MMIO32((uart) + 0x144)
64#define UART_INTEN(uart) _PERIPH_INTEN(uart)
65#define UART_INTENSET(uart) _PERIPH_INTENSET(uart)
66#define UART_INTENCLR(uart) _PERIPH_INTENCLR(uart)
67#define UART_ERRORSRC(uart) MMIO32((uart) + 0x480)
68#define UART_ENABLE(uart) MMIO32((uart) + 0x500)
69#define UART_PSELRTS(uart) MMIO32((uart) + 0x508)
70#define UART_PSELTXD(uart) MMIO32((uart) + 0x50C)
71#define UART_PSELCTS(uart) MMIO32((uart) + 0x510)
72#define UART_PSELRXD(uart) MMIO32((uart) + 0x514)
73#define UART_RXD(uart) MMIO32((uart) + 0x518)
74#define UART_TXD(uart) MMIO32((uart) + 0x51C)
75#define UART_BAUDRATE(uart) MMIO32((uart) + 0x524)
76#define UART_CONFIG(uart) MMIO32((uart) + 0x56C)
83#define UART_INTEN_CTS (1 << 0)
84#define UART_INTEN_NCTS (1 << 1)
85#define UART_INTEN_RXDRDY (1 << 2)
86#define UART_INTEN_TXDRDY (1 << 7)
87#define UART_INTEN_ERROR (1 << 9)
88#define UART_INTEN_RXTO (1 << 17)
92#define UART_ERRORSRC_OVERRUN (1 << 0)
93#define UART_ERRORSRC_PARITY (1 << 1)
94#define UART_ERRORSRC_FRAMING (1 << 2)
95#define UART_ERRORSRC_BREAK (1 << 3)
97#define UART_ENABLE_ENABLED (4)
98#define UART_ENABLE_DISABLED (0)
99#define UART_CONFIG_HWFC (1)
100#define UART_CONFIG_PARITY (7 << 1)
102#define UART_PSEL_OFF (0xff)
103#define UART_MAX_PIN (31)
104#define UART_PSEL_VAL(p) (p <= UART_MAX_PIN ? (uint32_t) p : 0xffffffff)
132uint32_t txd, uint32_t rxd, uint32_t rts, uint32_t cts,
141void uart_send(uint32_t uart, uint16_t
byte);
145void uart_set_pins(uint32_t uart, uint32_t rx, uint32_t tx, uint32_t cts, uint32_t rts);
void uart_disable(uint32_t uart)
Disable the peripheral.
void uart_send_stop(uint32_t uart)
void uart_set_parity(uint32_t uart, int parity)
void uart_set_pins(uint32_t uart, uint32_t rx, uint32_t tx, uint32_t cts, uint32_t rts)
Select GPIO pins to be used by this peripheral.
void uart_stop_tx(uint32_t uart)
uint16_t uart_recv(uint32_t uart)
void uart_set_baudrate(uint32_t uart, enum uart_baud br)
void uart_stop_rx(uint32_t uart)
void uart_set_flow_control(uint32_t uart, int flow)
void uart_send(uint32_t uart, uint16_t byte)
void uart_enable(uint32_t uart)
Enable the peripheral.
void uart_start_tx(uint32_t uart)
void uart_start_rx(uint32_t uart)
void uart_configure(uint32_t uart, uint32_t txd, uint32_t rxd, uint32_t rts, uint32_t cts, enum uart_baud br, bool enable_parity)
Configure UART parameters in single call.