Skip to content

Refactoring TwoWire::requestFrom() headers in Wire.cpp #5935

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 8 commits into from
Dec 14, 2021

Conversation

Maelstrom96
Copy link
Contributor


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

  1. Please provide specific title of the PR describing the change, including the component name (eg."Update of Documentation link on Readme.md")
  2. Please provide related links (eg. Issue, other Project, submodule PR..)

Summary

Changing the header so the main TwoWire::requestFrom() definition uses a size_t instead of a uint8_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.

Sorry, something went wrong.

Changing the header so the main TwoWire::requestFrom() definition uses a `size_t` instead of a `uint8_t`, removing the 255 bytes limit on I2C requests.
@CLAassistant
Copy link

CLAassistant commented Nov 28, 2021

CLA assistant check
All committers have signed the CLA.

@me-no-dev me-no-dev merged commit 7bb30b3 into espressif:master Dec 14, 2021
@me-no-dev
Copy link
Member

seems you did not compile your changes and just posted them here :) please test your code before submission next time.

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.

None yet

4 participants