26typedef volatile struct __attribute__((packed,aligned(4))) {
32#define NEORV32_UART0 ((neorv32_uart_t*) (NEORV32_UART0_BASE))
35#define NEORV32_UART1 ((neorv32_uart_t*) (NEORV32_UART1_BASE))
103#define neorv32_uart0_available() neorv32_uart_available(NEORV32_UART0)
104#define neorv32_uart0_get_rx_fifo_depth() neorv32_uart_get_rx_fifo_depth(NEORV32_UART0)
105#define neorv32_uart0_get_tx_fifo_depth() neorv32_uart_get_tx_fifo_depth(NEORV32_UART0)
106#define neorv32_uart0_setup(baudrate, irq_mask) neorv32_uart_setup(NEORV32_UART0, baudrate, irq_mask)
107#define neorv32_uart0_disable() neorv32_uart_disable(NEORV32_UART0)
108#define neorv32_uart0_enable() neorv32_uart_enable(NEORV32_UART0)
109#define neorv32_uart0_rtscts_disable() neorv32_uart_rtscts_disable(NEORV32_UART0)
110#define neorv32_uart0_rtscts_enable() neorv32_uart_rtscts_enable(NEORV32_UART0)
111#define neorv32_uart0_putc(c) neorv32_uart_putc(NEORV32_UART0, c)
112#define neorv32_uart0_tx_busy() neorv32_uart_tx_busy(NEORV32_UART0)
113#define neorv32_uart0_tx_free() neorv32_uart_tx_free(NEORV32_UART0)
114#define neorv32_uart0_tx_put(c) neorv32_uart_tx_put(NEORV32_UART0, c)
115#define neorv32_uart0_getc() neorv32_uart_getc(NEORV32_UART0)
116#define neorv32_uart0_char_received() neorv32_uart_char_received(NEORV32_UART0)
117#define neorv32_uart0_char_received_get() neorv32_uart_char_received_get(NEORV32_UART0)
118#define neorv32_uart0_puts(s) neorv32_uart_puts(NEORV32_UART0, s)
119#define neorv32_uart0_printf(...) neorv32_uart_printf(NEORV32_UART0, __VA_ARGS__)
120#define neorv32_uart0_scan(buffer, max_size, echo) neorv32_uart_scan(NEORV32_UART0, buffer, max_size, echo)
122#define neorv32_uart1_available() neorv32_uart_available(NEORV32_UART1)
123#define neorv32_uart1_get_rx_fifo_depth() neorv32_uart_get_rx_fifo_depth(NEORV32_UART1)
124#define neorv32_uart1_get_tx_fifo_depth() neorv32_uart_get_tx_fifo_depth(NEORV32_UART1)
125#define neorv32_uart1_setup(baudrate, irq_mask) neorv32_uart_setup(NEORV32_UART1, baudrate, irq_mask)
126#define neorv32_uart1_disable() neorv32_uart_disable(NEORV32_UART1)
127#define neorv32_uart1_enable() neorv32_uart_enable(NEORV32_UART1)
128#define neorv32_uart1_rtscts_disable() neorv32_uart_rtscts_disable(NEORV32_UART1)
129#define neorv32_uart1_rtscts_enable() neorv32_uart_rtscts_enable(NEORV32_UART1)
130#define neorv32_uart1_putc(c) neorv32_uart_putc(NEORV32_UART1, c)
131#define neorv32_uart1_tx_busy() neorv32_uart_tx_busy(NEORV32_UART1)
132#define neorv32_uart1_tx_free() neorv32_uart_tx_free(NEORV32_UART1)
133#define neorv32_uart1_tx_put(c) neorv32_uart_tx_put(NEORV32_UART1, c)
134#define neorv32_uart1_getc() neorv32_uart_getc(NEORV32_UART1)
135#define neorv32_uart1_char_received() neorv32_uart_char_received(NEORV32_UART1)
136#define neorv32_uart1_char_received_get() neorv32_uart_char_received_get(NEORV32_UART1)
137#define neorv32_uart1_puts(s) neorv32_uart_puts(NEORV32_UART1, s)
138#define neorv32_uart1_printf(...) neorv32_uart_printf(NEORV32_UART1, __VA_ARGS__)
139#define neorv32_uart1_scan(buffer, max_size, echo) neorv32_uart_scan(NEORV32_UART1, buffer, max_size, echo)
int neorv32_uart_get_tx_fifo_depth(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:124
char neorv32_uart_getc(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:234
void neorv32_uart_puts(neorv32_uart_t *UARTx, const char *s)
Definition neorv32_uart.c:280
void neorv32_uart_tx_put(neorv32_uart_t *UARTx, char c)
Definition neorv32_uart.c:220
void neorv32_uart_rtscts_enable(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:158
int neorv32_uart_tx_free(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:208
void neorv32_uart_rtscts_disable(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:169
void neorv32_uart_vprintf(neorv32_uart_t *UARTx, const char *format, va_list args)
Definition neorv32_uart.c:303
void neorv32_uart_putc(neorv32_uart_t *UARTx, char c)
Definition neorv32_uart.c:183
void neorv32_uart_setup(neorv32_uart_t *UARTx, uint32_t baudrate, uint32_t irq_mask)
Definition neorv32_uart.c:47
char neorv32_uart_char_received_get(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:265
int neorv32_uart_tx_busy(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:196
void neorv32_uart_printf(neorv32_uart_t *UARTx, const char *format,...)
Definition neorv32_uart.c:383
int neorv32_uart_available(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:26
int neorv32_uart_scan(neorv32_uart_t *UARTx, char *buffer, int max_size, int echo)
Definition neorv32_uart.c:403
NEORV32_UART_CTRL_enum
Definition neorv32_uart.h:38
@ UART_CTRL_TX_BUSY
Definition neorv32_uart.h:56
@ UART_CTRL_BAUD_MSB
Definition neorv32_uart.h:45
@ UART_CTRL_IRQ_TX_EMPTY
Definition neorv32_uart.h:52
@ UART_CTRL_RX_NEMPTY
Definition neorv32_uart.h:46
@ UART_CTRL_TX_NFULL
Definition neorv32_uart.h:49
@ UART_CTRL_EN
Definition neorv32_uart.h:39
@ UART_CTRL_SIM_MODE
Definition neorv32_uart.h:40
@ UART_CTRL_RX_FULL
Definition neorv32_uart.h:47
@ UART_CTRL_IRQ_RX_NEMPTY
Definition neorv32_uart.h:50
@ UART_CTRL_RX_OVER
Definition neorv32_uart.h:55
@ UART_CTRL_PRSC_MSB
Definition neorv32_uart.h:43
@ UART_CTRL_IRQ_TX_NFULL
Definition neorv32_uart.h:53
@ UART_CTRL_PRSC_LSB
Definition neorv32_uart.h:42
@ UART_CTRL_TX_EMPTY
Definition neorv32_uart.h:48
@ UART_CTRL_HWFC_EN
Definition neorv32_uart.h:41
@ UART_CTRL_BAUD_LSB
Definition neorv32_uart.h:44
@ UART_CTRL_IRQ_RX_FULL
Definition neorv32_uart.h:51
NEORV32_UART_DATA_enum
Definition neorv32_uart.h:60
@ UART_DATA_RTX_MSB
Definition neorv32_uart.h:62
@ UART_DATA_RX_FIFO_SIZE_LSB
Definition neorv32_uart.h:64
@ UART_DATA_TX_FIFO_SIZE_LSB
Definition neorv32_uart.h:67
@ UART_DATA_RX_FIFO_SIZE_MSB
Definition neorv32_uart.h:65
@ UART_DATA_TX_FIFO_SIZE_MSB
Definition neorv32_uart.h:68
@ UART_DATA_RTX_LSB
Definition neorv32_uart.h:61
int neorv32_uart_char_received(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:250
void neorv32_uart_disable(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:147
int neorv32_uart_get_rx_fifo_depth(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:110
void neorv32_uart_enable(neorv32_uart_t *UARTx)
Definition neorv32_uart.c:136
Definition neorv32_uart.h:26
uint32_t CTRL
Definition neorv32_uart.h:27
uint32_t DATA
Definition neorv32_uart.h:28