uart
1.4
Serial stream for Xmega/Wrapper for UART-driver Xmega
|
Example for stream (stream.c and stream.h). More...
Macros | |
#define | F_CPU 2000000UL |
system clock frequency | |
Functions | |
int | main (void) |
main routine example for HvA-Xmegaboard More... | |
Example for stream (stream.c and stream.h).
This example for HvA-Xmegaboard with streams using stream.c and stream.h with 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 scanf to receive a byte and to send this byte back in a formatted text string.
This example is code 19.19 from 'De taal C en de Xmega' second edition, see Voorbeelden uit 'De taal C en de Xmega'
The baud rate is 115200
int main | ( | void | ) |
main routine example for HvA-Xmegaboard
It initializes the standard streams for USARTF0. It wait until it receives a character from the UART and sends the character back in a formatted text string.