Skip to content

[Documentation] Wire read return type #897

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

Open
CombiesGit opened this issue Jul 16, 2020 · 1 comment
Open

[Documentation] Wire read return type #897

CombiesGit opened this issue Jul 16, 2020 · 1 comment
Assignees
Labels

Comments

@CombiesGit
Copy link

Docu: Wire::read()

Returns
The next byte received

It should be:

Returns
The next byte received (or -1 if no data is available). Data type: int.

@per1234 per1234 transferred this issue from arduino/Arduino Jul 17, 2022
@per1234 per1234 added the bug label Jul 17, 2022
@carlosperate
Copy link
Contributor

carlosperate commented Dec 25, 2022

Is that always meant to be the case? In the Mbed core it looks like it returns 0:
https://github.com/arduino/ArduinoCore-mbed/blob/949c70ce6ae7d2910e5768d6d88fc3ae0e943584/libraries/Wire/Wire.cpp#L123

Edit: It is meant to be -1, the Mbed core will be updated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants