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

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

## Detailed Description

     #include "uart.h"

Overview
  To be written...

## Defines
#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)
## 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)
int | uart0SendByte (int data)
| sends a single byte over the uart
int | uart1SendByte (int data)
int | uart2SendByte (int data)
int | uart0GetByte (void)
| gets a single byte from the uart
int | uart1GetByte (void)
int | uart2GetByte (void)