docs/library/esp: Document esp.flash_read. - #19599
Open
agatti wants to merge 1 commit into
Open
Conversation
Josverl
reviewed
Aug 10, 2026
|
|
||
| On ESP8266 the second argument indicates how many bytes to read from the | ||
| given starting point, with the requested number of bytes will be returned as | ||
| a ``bytes`` object containing the requested data. Requesting more data than |
Contributor
There was a problem hiding this comment.
with the requested number of bytes will be returned as
abytesobject containing the requested data.
Suggest : returns a bytes object of the requested length containing the requested data.
Contributor
There was a problem hiding this comment.
and FWIW this matches the signature(s) I use in the the MicroPython stubs. ( your description will be pulled as a docstring once merged)
This commit adds a documentation block for `esp.flash_read`, describing its usage and the discrepancies in its implementation between ESP8266 and ESP32. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
agatti
force-pushed
the
esp32-flash-read-docs
branch
from
August 10, 2026 21:38
57d37dd to
bd7b0c0
Compare
dpgeorge
reviewed
Aug 13, 2026
| This function is present in both ESP8266 and ESP32, albeit with different | ||
| meanings for the second argument. | ||
|
|
||
| On ESP8266 the second argument indicates how many bytes to read from the |
Member
There was a problem hiding this comment.
From what I can tell by reading the code, esp8266 also supports passing in a pre-allocated buffer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
This PR adds a documentation block for
esp.flash_read, describing its usage and the discrepancies in its implementation between ESP8266 and ESP32.This closes #6553.
Testing
Some manual edge case testing was performed on both ESP8266 and ESP32 boards, and the documentation was built using
make htmlto make sure no incorrect markup was detected.Generative AI
I did not use generative AI tools when creating this PR.