/* * uart.h * * Interface declarations for UART initalization and printf() setup using avr-libc. * * After including uart.c and uart.h into your project and calling uart_init(), * you can use printf() for serial port output, for instance to communicate with a * PC over RS-232. * * Even though it has nothing to do with use of the UART, but rather printf(): * * To printf() floating point values, you need to add the following to your AVR * Studio project's Linker Options: (Project->Configuration Options->Custom Options->Linker Options): * (copy and paste the entire line below): * * -Wl,-u,vfprintf -lprintf_flt -lm * * This functionality requires a significant amount of extra library code to be included * in the final program image, and so is not specified by default. * * For more information about using the UART with avr-libc's printf functions, * see the "Detailed Description" section in * http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html . * * Last modified 2010-09-09 15:27 */ #ifndef UART_H #define UART_H /* * This function must be called to be able to use the UART for printf() output. */ void uart_init(void); #endif