Refactoring TwoWire::requestFrom() headers in Wire.cpp #5935
+21
−15
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This entire section can be deleted if all items are checked.
By completing this PR sufficiently, you help us to improve the quality of Release Notes
Checklist
Summary
Changing the header so the main TwoWire::requestFrom() definition uses a
size_t
instead of auint8_t
, removing the 255 bytes limit on I2C requests.The esp8266 arduino library for Wire is already using size_t for the function implementation : https://github.com/esp8266/Arduino/blob/076a4edf1e8146ef7420018a0b5b3eadc9acf6af/libraries/Wire/Wire.cpp#L123
This fix is in order to allow us to read 284 bytes, which is necessary for this project.
Impact
This shouldn't have any impact on existing code using this function.