/* * rs232.c * * Created: 06.10.2013 16:34:27 * Author: netz */ #include "config.h" #include #include #include "rs232.h" int uart_putchar(char c, FILE *stream); static FILE rs232 = FDEV_SETUP_STREAM(uart_putchar, NULL, _FDEV_SETUP_WRITE); int uart_putchar(char c, FILE *stream) { if (c == '\n') { uart_putchar('\r', stream); //Warten solange bis Zeichen gesendet wurde } loop_until_bit_is_set(UCSR1A, UDRE1); //Ausgabe des Zeichens UDR1 = c; return (0); } void init_rs232() { UCSR1C = (1 << UCSZ11) |(1 << UCSZ10); //8N1 UCSR1B |= /*(1<