Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

serial terminal compile fix #153

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pollserial/pollserial.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,12 +128,12 @@ 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;
#else
while (!((UCSRA) & _BV(UDRE)));
UDR = c;
#endif
}
}
4 changes: 2 additions & 2 deletions pollserial/pollserial.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
#endif