X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=common%2Fserial.h;fp=common%2Fserial.h;h=f5d59876114c29d01876e3cdedd96b4a83184452;hb=3ab99e7747d85b12bbfd429966ec42ade02b2da1;hp=04ea50b198fc502c2d4812ddd370746bc2e6ae93;hpb=a4919e44177de59604d8c088487ede49e3884b35;p=model-railway-devices.git diff --git a/common/serial.h b/common/serial.h index 04ea50b..f5d5987 100644 --- a/common/serial.h +++ b/common/serial.h @@ -1,16 +1,13 @@ #ifndef SERIAL_H_ #define SERIAL_H_ -#include - -#define SERIAL_SET_CALLBACK(f) \ - ISR(USART_RX_vect) \ - { \ - char c = UDR0; \ - f(c); \ - } +#include void serial_init(uint16_t); +uint8_t serial_read(); +uint8_t serial_read_available(); +uint8_t serial_read_overrun(); void serial_write(uint8_t); +uint8_t serial_write_space(); #endif