uart
1.4
Serial stream for Xmega/Wrapper for UART-driver Xmega
|
Example for wrapper (uart.c and uart.h). More...
Macros | |
#define | F_CPU 2000000UL |
system clock frequency | |
#define | ENABLE_UART_C1 1 |
Macro ENABLE_UART_C1 non zero, in order to ensure that UART C1 is used. | |
#define | C1_BAUD 115200 |
baud rate | |
#define | C1_CLK2X 0 |
no double clock speed | |
Functions | |
int | main (void) |
main routine example More... | |
Example for wrapper (uart.c and uart.h).
This example using the wrapper (uart.c and uart.h) for the UART-driver from Atmel's application note AVR1307 (usart_driver.c and usart_driver.h) which uses avr_compiler.h.
This example uses the wrapper to receive a byte and to send this byte back in a formatted text string.
int main | ( | void | ) |
main routine example
It initializes the USARTC1 and receive characters from the UART and sends the characters back in a formatted text string.