diff --git a/pollserial/pollserial.cpp b/pollserial/pollserial.cpp index 8093f19..7fc285e 100644 --- a/pollserial/pollserial.cpp +++ b/pollserial/pollserial.cpp @@ -128,7 +128,7 @@ void pollserial::flush() { rxbuffer.head = rxbuffer.tail; } -void pollserial::write(uint8_t c) { +size_t pollserial::write(uint8_t c) { #if defined ( UDR0 ) while (!((UCSR0A) & _BV(UDRE0))); UDR0 = c; @@ -136,4 +136,4 @@ void pollserial::write(uint8_t c) { while (!((UCSRA) & _BV(UDRE))); UDR = c; #endif -} \ No newline at end of file +} diff --git a/pollserial/pollserial.h b/pollserial/pollserial.h index 95e704a..667da8e 100644 --- a/pollserial/pollserial.h +++ b/pollserial/pollserial.h @@ -43,9 +43,9 @@ class pollserial : public Print { uint8_t available(void); int read(void); void flush(void); - virtual void write(uint8_t); + virtual size_t write(uint8_t); using Print::write; // pull in write(str) and write(buf, size) from Print }; void USART_recieve(); -#endif \ No newline at end of file +#endif