uart  1.4
Serial stream for Xmega/Wrapper for UART-driver Xmega
 All Files Functions Variables Macros
wrapper_test_f0.c File Reference

Example for wrapper (uart.c and uart.h). More...

#include <avr/io.h>
#include <avr/interrupt.h>
#include "uart.h"

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...
 

Detailed Description

Example for wrapper (uart.c and uart.h).

Author
Wim Dolman (w.e.dolman@hva.nl)
Date
03-10-2016
Version
1.4

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.

Note
With the internal RC-oscillators 2 MHz or 32 MHz, it can be necessary to calibrate this internal clock.

Function Documentation

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.

Returns
int