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_F0 1 |
Macro ENABLE_UART_F0 non zero, in order to ensure that UART F0 is used. | |
#define | BAUD 115200 |
baud rate | |
#define | CLK2X 0 |
no double clock speed | |
Functions | |
int | main (void) |
main routine example with USART0 port F 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 with USART0 port F
It initializes the USARTF0 and receive characters from the UART and sends the characters back in a formatted text string.