28 #ifndef MCU_PERIPH_UART_H
29 #define MCU_PERIPH_UART_H
31 #include "mcu_periph/uart_arch.h"
35 #ifndef UART_RX_BUFFER_SIZE
36 #define UART_RX_BUFFER_SIZE 128
38 #ifndef UART_TX_BUFFER_SIZE
39 #define UART_TX_BUFFER_SIZE 128
41 #define UART_DEV_NAME_SIZE 16
55 #define UPARITY_EVEN 2
103 extern void uart0_init(
void);
108 extern void uart1_init(
void);
113 extern void uart2_init(
void);
118 extern void uart3_init(
void);
123 extern void uart4_init(
void);
128 extern void uart5_init(
void);
133 extern void uart6_init(
void);
138 extern void uart7_init(
void);
143 extern void uart8_init(
void);
uint8_t tx_buf[UART_TX_BUFFER_SIZE]
Transmit buffer.
#define UART_DEV_NAME_SIZE
bool_t uart_check_free_space(struct uart_periph *p, uint8_t len)
void uart_periph_set_bits_stop_parity(struct uart_periph *p, uint8_t bits, uint8_t stop, uint8_t parity)
uint8_t rx_buf[UART_RX_BUFFER_SIZE]
Receive buffer.
void uart_put_byte(struct uart_periph *p, uint8_t data)
void uart_periph_set_baudrate(struct uart_periph *p, uint32_t baud)
struct link_device device
Generic device interface.
uint16_t uart_char_available(struct uart_periph *p)
Check UART for available chars in receive buffer.
void * reg_addr
UART Register.
#define UART_TX_BUFFER_SIZE
volatile uint16_t ne_err
noise error counter
volatile uint16_t fe_err
framing error counter
uint8_t uart_getch(struct uart_periph *p)
char dev[UART_DEV_NAME_SIZE]
UART Dev (linux)
void uart_periph_init(struct uart_periph *p)
void uart_periph_set_mode(struct uart_periph *p, bool_t tx_enabled, bool_t rx_enabled, bool_t hw_flow_control)
int baudrate
UART Baudrate.
void uart_arch_init(void)
volatile uint16_t ore
overrun error counter
#define UART_RX_BUFFER_SIZE