]> git.tdb.fi Git - model-railway-devices.git/blob - firmware/serial.h
Rename the project to R²C²
[model-railway-devices.git] / firmware / serial.h
1 /* $Id$
2
3 This file is part of R²C²
4 Copyright © 2010  Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef SERIAL_H_
9 #define SERIAL_H_
10
11 #include <avr/interrupt.h>
12
13 #define SERIAL_SET_CALLBACK(f) \
14         ISR(USART_RX_vect) \
15         { \
16                 char c = UDR0; \
17                 f(c); \
18         }
19
20 void serial_init(uint16_t);
21 void serial_write(uint8_t);
22
23 #endif