#include <uart.h>
#include <uart_defs.h>
#include <uart_private.h>
Go to the source code of this file.
Defines | |
#define | UART_SET_STATICCONF(x) |
Functions | |
int8_t | uart_setconf (uint8_t num, struct uart_config *u) |
#define UART_SET_STATICCONF | ( | x | ) |
Value:
u->enabled = UART##x##_ENABLED; \
u->intr_enabled = UART##x##_INTERRUPT_ENABLED; \
u->use_double_speed = UART##x##_USE_DOUBLE_SPEED; \
u->parity = UART##x##_PARITY; \
u->stop_bits = UART##x##_STOP_BIT; \
u->nbits = UART##x##_NBITS; \
u->baudrate = UART##x##_BAUDRATE; \
break
Definition at line 156 of file uart_setconf.c.
Referenced by uart_setconf().
int8_t uart_setconf | ( | uint8_t | num, | |
struct uart_config * | u | |||
) |
Configure the uart 'num' with the given configuration. Returns 0 on success.
Definition at line 166 of file uart_setconf.c.
References uart_config::baudrate, cirbuf_init(), EINVAL, uart_config::enabled, ENOTSUP, ESUCCESS, F_CPU, g_rx_fifo, g_tx_fifo, uart_config::intr_enabled, IRQ_LOCK, IRQ_UNLOCK, parse_symbols::l, RXCIE, RXEN, TXEN, U2X, UART_HAS_U2X, uart_regs, UART_SET_STATICCONF, regs::ucsra, regs::ucsrb, UDRE, and uart_config::use_double_speed.
Referenced by uart_init().