Skip to content

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

Merged
merged 2 commits into from
Aug 23, 2017
Merged

Conversation

cmaglie
Copy link
Member

@cmaglie cmaglie commented Aug 23, 2017

No description provided.

@cmaglie cmaglie requested a review from sandeepmistry August 23, 2017 15:00
@@ -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; }
Copy link
Contributor

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?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes... good point...

Copy link
Contributor

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.

Copy link
Contributor

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.

@ArduinoBot
Copy link

✅ Build completed.

⬇️ Build URL: http://downloads.arduino.cc/PR/samd/package_samd-b160_index.json

ℹ️ To test this build:

  1. Open the Preferences of the Arduino IDE.
  2. Add the Build URL above in the Additional Boards Manager URLs field, and click OK.
  3. Open the Boards Manager (menu Tools->Board->Board Manager...)
  4. Install Arduino SAMD core - Pull Request Some updates on Stream and Print class. #254
  5. Select one of the boards under SAMD Pull Request Some updates on Stream and Print class. #254 in Tools->Board menu
  6. Compile/Upload as usual

@arduino arduino deleted a comment from ArduinoBot Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants