Skip to content
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

docs on read() need additional information #632

Closed
2bndy5 opened this issue Sep 20, 2020 · 0 comments · Fixed by #639
Closed

docs on read() need additional information #632

2bndy5 opened this issue Sep 20, 2020 · 0 comments · Fixed by #639

Comments

@2bndy5
Copy link
Member

2bndy5 commented Sep 20, 2020

I noticed that the nRF24L01 will return additional data from other payloads in the RX FIFO when the len argument is larger than the next payload in the RX FIFO (in consecutive order of course). If len is greater than the last payload available in the RX FIFO, then buf is padded with the last available byte accordingly. This functionality can be useful for fetching the entire RX FIFO contents in 1 SPI transaction. Since this behavior is embedded in the nRF24L01 firmware, the library should not try to compensate.

To be clear, payloads are not removed from the RX FIFO unless the entire payload is fetched. Also, if len is less than the next available payload, then the payload will remain until entirely read from the RX FIFO. According to the datasheet, all attempts to read from the RX FIFO start at the first byte in the first available payload.

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

Successfully merging a pull request may close this issue.

1 participant