#include <aversive.h>
#include <aversive/list.h>
#include <uart.h>
#include <uart_defs.h>
#include <uart_config.h>
Go to the source code of this file.
Data Structures | |
struct | regs |
Typedefs | |
typedef volatile uint8_t * | uart_reg_t |
typedef void( | event )(char) |
typedef void( | event_9bits )(int) |
Functions | |
void | uart_send_next_char (uint8_t num) |
int8_t | uart_setconf (uint8_t num, struct uart_config *u) |
Variables | |
struct regs | uart_regs [UART_HW_NUM] |
struct cirbuf | g_tx_fifo [UART_HW_NUM] |
struct cirbuf | g_rx_fifo [UART_HW_NUM] |
event * | rx_event [UART_HW_NUM] |
event * | tx_event [UART_HW_NUM] |
typedef void( event)(char) |
Definition at line 47 of file uart_private.h.
typedef void( event_9bits)(int) |
Definition at line 48 of file uart_private.h.
typedef volatile uint8_t* uart_reg_t |
Definition at line 34 of file uart_private.h.
void uart_send_next_char | ( | uint8_t | num | ) |
This is the interruption function which occurs when there is a new unread data in the reception buffer. transmit next character of fifo if any, and call the event function. This function is executed with intr locked.
Definition at line 171 of file uart.c.
References cbi, cirbuf_del_buf_tail(), cirbuf_del_tail(), cirbuf_get_buf_tail(), CIRBUF_GET_LEN, cirbuf_get_tail(), CIRBUF_IS_EMPTY, parse_doc::elt, g_tx_fifo, sbi, uart_getconf_nbits(), regs::ucsrb, and UDRIE.
Referenced by uart_send(), and uart_send_9bits().
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 38 of file uart_host.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.
The reception fifo of uart
Definition at line 32 of file uart.c.
Referenced by uart_9bits_recv_nowait(), uart_recv_nowait(), and uart_setconf().
The emission fifo of uart
Definition at line 31 of file uart.c.
Referenced by uart_send(), uart_send_9bits(), uart_send_9bits_nowait(), uart_send_next_char(), uart_send_nowait(), and uart_setconf().
Definition at line 35 of file uart.c.
Referenced by mf2_client_register_rx_event(), mf2_server_register_rx_event(), mf2_server_timer_cb(), SIGNAL(), and uart_register_rx_event().
Definition at line 36 of file uart.c.
Referenced by mf2_client_register_tx_event(), mf2_server_register_tx_event(), SIGNAL(), and uart_register_tx_event().
Definition at line 45 of file uart_private.h.