aversive_10-03-12/modules/comm/uart/uart.c File Reference

Errors of the UART module. More...

#include <aversive.h>
#include <aversive/list.h>
#include <uart.h>
#include <uart_defs.h>
#include <uart_private.h>

Go to the source code of this file.

Functions

void uart_send_next_char (uint8_t num)
void uart_init (void)

Variables

struct cirbuf g_tx_fifo [UART_HW_NUM]
struct cirbuf g_rx_fifo [UART_HW_NUM]
eventrx_event [UART_HW_NUM]
eventtx_event [UART_HW_NUM]
struct regs uart_regs [UART_HW_NUM]


Detailed Description

Errors of the UART module.

Todo:
None
Test:
None

Definition in file uart.c.


Function Documentation

void uart_init ( void   ) 

Initialisation function. This function puts the registers of the microcontroler in a correct state in order to use the uart. It uses the configuration file <uart_config.h> ; this function is equivalent to call uartX_setconf(NULL) for each uart.

Definition at line 239 of file uart.c.

Referenced by main().

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().


Variable Documentation

struct cirbuf g_rx_fifo[UART_HW_NUM]

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().

struct cirbuf g_tx_fifo[UART_HW_NUM]

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().

event* rx_event[UART_HW_NUM]

event* tx_event[UART_HW_NUM]

struct regs uart_regs[UART_HW_NUM]


Generated on Fri Mar 12 06:32:05 2010 for AVR by  doxygen 1.5.6