Skip to content

SAM Wire: fixed NACK/timeout behavior of requestFrom() and available() #1869

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 1 commit into from
Jul 1, 2015

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