-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Serial.flush modification #5293
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
Conversation
CI fails: uart.h needs to be committed too. |
I'm not sure about the implicit start bit but it is not necessary to wait when the returned value is 0 since the HardwareSerial::flush function already handles a situation when uart is null. |
Start bit is always there, so IMHO 1 should be added to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
49802d5
to
1ffa9fa
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like an improvement, and makes good sense.
Added a few defines to extract width, parity and stop from uart mode in uart.c as suggested in the comments in #5094 and modified flush in HardwareSerial.cpp file.