-
-
Notifications
You must be signed in to change notification settings - Fork 726
Some updates on Stream and Print class. #254
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
@@ -54,6 +57,10 @@ class Print | |||
return write((const uint8_t *)buffer, size); | |||
} | |||
|
|||
// default to zero, meaning "a single write may block" | |||
// should be overriden by subclasses with buffering | |||
virtual int availableForWrite() { return 0; } |
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.
Should we make Uart:: availableForWrite()
virtual as well?
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.
yes... good point...
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.
Same for I2S, those are the only two spots in the repo.
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.
Based on testing, adding the virtual doesn't seem to make a difference, we just needed to change the size_t
to int
in I2S.
✅ Build completed. ⬇️ Build URL: ℹ️ To test this build:
|
No description provided.