Skip to content

Conversation

kevin-pololu
Copy link
Contributor

readed is no longer incremented in requestFrom() if TWI_WaitByteReceived() gets a NACK or times out. This corrects the behavior (return values) of requestFrom() and available() to match the Arduino reference; they should return the number of bytes actually available for read(), not the number of bytes requested, which was the previous behavior. Fixes #1311

"readed" is no longer incremented in requestFrom() if
TWI_WaitByteReceived() gets a NACK or times out. This corrects the
behavior (return values) of requestFrom() and available() to match the
Arduino reference. Fixes arduino#1311
@ffissore ffissore added the Core label Feb 27, 2014
@cmaglie cmaglie added Type: Bug Library: Wire The Wire Arduino library Architecture: SAM Applies only to the SAM microcontrollers (Due) and removed Component: Core Related to the code for the standard Arduino API labels Apr 15, 2015
@cmaglie cmaglie added this to the Release 1.6.6 milestone Jul 1, 2015
@cmaglie cmaglie assigned facchinm and unassigned cmaglie Jul 1, 2015
facchinm added a commit that referenced this pull request Jul 1, 2015
SAM Wire: fixed NACK/timeout behavior of requestFrom() and available()
@facchinm facchinm merged commit 98d0a72 into arduino:ide-1.5.x Jul 1, 2015
@facchinm
Copy link
Member

facchinm commented Jul 1, 2015

Merged, thank you!

ollie1400 pushed a commit to ollie1400/Arduino that referenced this pull request May 2, 2022
SAM Wire: fixed NACK/timeout behavior of requestFrom() and available()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture: SAM Applies only to the SAM microcontrollers (Due) Library: Wire The Wire Arduino library Type: Bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants