Skip to content

[Documentation] Wire read return type #897

@CombiesGit

Description

@CombiesGit

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.

Activity

transferred this issue fromarduino/Arduinoon Jul 17, 2022
carlosperate

carlosperate commented on Dec 25, 2022

@carlosperate
Contributor

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    [Documentation] Wire read return type · Issue #897 · arduino/reference-en