X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=common%2Fserial.h;fp=common%2Fserial.h;h=04ea50b198fc502c2d4812ddd370746bc2e6ae93;hb=9c37d18b9c70fdb70dfec453398c4649e9e57586;hp=0000000000000000000000000000000000000000;hpb=49b6b6ad84ec47b4f9eb9ef131975cc5b72372a2;p=model-railway-devices.git diff --git a/common/serial.h b/common/serial.h new file mode 100644 index 0000000..04ea50b --- /dev/null +++ b/common/serial.h @@ -0,0 +1,16 @@ +#ifndef SERIAL_H_ +#define SERIAL_H_ + +#include + +#define SERIAL_SET_CALLBACK(f) \ + ISR(USART_RX_vect) \ + { \ + char c = UDR0; \ + f(c); \ + } + +void serial_init(uint16_t); +void serial_write(uint8_t); + +#endif