]> git.tdb.fi Git - r2c2.git/blob - firmware/serial.h
Separate train routing logic to a class derived from TrainAI
[r2c2.git] / firmware / serial.h
1 #ifndef SERIAL_H_
2 #define SERIAL_H_
3
4 #include <avr/interrupt.h>
5
6 #define SERIAL_SET_CALLBACK(f) \
7         ISR(USART_RX_vect) \
8         { \
9                 char c = UDR0; \
10                 f(c); \
11         }
12
13 void serial_init(uint16_t);
14 void serial_write(uint8_t);
15
16 #endif