Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# UART driver for AT91SAM7S with DMA (armlib/arch/at91/uartdma.c)
[Drivers for Atmel AT91 ARM Processors]

## Detailed Description

     #include "uartdma.h"

Overview
  To be written...

## Defines
#define | UART0_INTERRUPT_LEVEL 6
#define | UART1_INTERRUPT_LEVEL 6
#define | UART_BAUD(baud) (uint16_t)((F_CPU+baud*8L)/(baud*16))
#define | UART_8N1 (AT91C_US_CHRL_8_BITS | AT91C_US_PAR_NONE | AT91C_US_NBSTOP_1_BIT)
#define | UART_8N2 (AT91C_US_CHRL_8_BITS | AT91C_US_PAR_NONE | AT91C_US_NBSTOP_2_BIT)
#define | UART_7N1 (AT91C_US_CHRL_7_BITS | AT91C_US_PAR_NONE | AT91C_US_NBSTOP_1_BIT)
#define | UART_7N2 (AT91C_US_CHRL_7_BITS | AT91C_US_PAR_NONE | AT91C_US_NBSTOP_2_BIT)
#define | UART_8E1 (AT91C_US_CHRL_8_BITS | AT91C_US_PAR_EVEN | AT91C_US_NBSTOP_1_BIT)
#define | UART_8E2 (AT91C_US_CHRL_8_BITS | AT91C_US_PAR_EVEN | AT91C_US_NBSTOP_2_BIT)
#define | UART_7E1 (AT91C_US_CHRL_7_BITS | AT91C_US_PAR_EVEN | AT91C_US_NBSTOP_1_BIT)
#define | UART_7E2 (AT91C_US_CHRL_7_BITS | AT91C_US_PAR_EVEN | AT91C_US_NBSTOP_2_BIT)
#define | UART_8O1 (AT91C_US_CHRL_8_BITS | AT91C_US_PAR_ODD | AT91C_US_NBSTOP_1_BIT)
#define | UART_8O2 (AT91C_US_CHRL_8_BITS | AT91C_US_PAR_ODD | AT91C_US_NBSTOP_2_BIT)
#define | UART_7O1 (AT91C_US_CHRL_7_BITS | AT91C_US_PAR_ODD | AT91C_US_NBSTOP_1_BIT)
#define | UART_7O2 (AT91C_US_CHRL_7_BITS | AT91C_US_PAR_ODD | AT91C_US_NBSTOP_2_BIT)
#define | UART0_TX_BUFFER_SIZE 0x0010
| number of bytes for uart0 transmit buffer
#define | UART0_RX_BUFFER_SIZE 0x0080
| number of bytes for uart0 receive buffer
#define | UART1_TX_BUFFER_SIZE 0x0010
| number of bytes for uart1 transmit buffer
#define | UART1_RX_BUFFER_SIZE 0x0080
| number of bytes for uart1 receive buffer
#define | UART2_TX_BUFFER_SIZE 0x0010
| number of bytes for uart2 transmit buffer
#define | UART2_RX_BUFFER_SIZE 0x0080
| number of bytes for uart2 receive buffer
## Functions
void | uart0Init (uint16_t bauddiv, uint32_t mode)
| initializes uart
void | uart1Init (uint16_t bauddiv, uint32_t mode)
void | uart2Init (uint16_t bauddiv, uint32_t mode)
void | uart0InitBuffers (void)
| initializes transmit and receive buffers
void | uart1InitBuffers (void)
void | uart2InitBuffers (void)
void | uartInitDmaTx (int dev)
| setup DMA for circular-buffer transmit
void | uartInitDmaRx (int dev)
| setup DMA for circular-buffer receive
cBuffer * | uartGetRxBuffer (int dev)
int | uartSendByte (int dev, int data)
| sends a single byte over the uart
int | uart0SendByte (int data)
| sends a single byte over the uart
int | uart1SendByte (int data)
int | uart2SendByte (int data)
int | uartGetByte (int dev)
| gets a single byte from the uart receive buffer
int | uart0GetByte (void)
| gets a single byte from the uart receive buffer
int | uart1GetByte (void)
int | uart2GetByte (void)
int | uartSendBlock (int dev, unsigned char *data, unsigned int len)
| sends a block of data over the uart
int | uart0SendBlock (unsigned char *data, unsigned int len)
int | uart1SendBlock (unsigned char *data, unsigned int len)
int | uart2SendBlock (unsigned char *data, unsigned int len)
int | uartGetBlock (int dev, unsigned char *data, unsigned int len)
| gets a block of data from over the uart
int | uart0GetBlock (unsigned char *data, unsigned int len)
int | uart1GetBlock (unsigned char *data, unsigned int len)
int | uart2GetBlock (unsigned char *data, unsigned int len)
void | uart0Service (void)
| interrupt service handlers
void | uart1Service (void)
void | uart2Service (void)