X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=firmware%2Fserial.h;h=e5bfebe35569c95ec4988293ecd6bc409f158451;hb=1ff06c5bc46a677fa389ef86c6b26664368f1653;hp=e62b0a9df7137ce313ba15420de7a8308e1d8821;hpb=ed7a7139f4858fe5d0c756798538d25893bf58b2;p=r2c2.git diff --git a/firmware/serial.h b/firmware/serial.h index e62b0a9..e5bfebe 100644 --- a/firmware/serial.h +++ b/firmware/serial.h @@ -1,10 +1,23 @@ +/* $Id$ + +This file is part of R²C² +Copyright © 2010 Mikkosoft Productions, Mikko Rasa +Distributed under the GPL +*/ + #ifndef SERIAL_H_ #define SERIAL_H_ -typedef void SerialCallback(uint8_t); +#include + +#define SERIAL_SET_CALLBACK(f) \ + ISR(USART_RX_vect) \ + { \ + char c = UDR0; \ + f(c); \ + } void serial_init(uint16_t); -void serial_set_callback(SerialCallback *); void serial_write(uint8_t); #endif