-
Notifications
You must be signed in to change notification settings - Fork 119
Sercom: partially revert error handling change #378
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -605,9 +605,7 @@ bool SERCOM::sendDataMasterWIRE(uint8_t data) | |||||
| while(!sercom->I2CM.INTFLAG.bit.MB) { | ||||||
| // If a data transfer error occurs, the MB bit may never be set. | ||||||
| // Check the error bit and bail if it's set. | ||||||
| // The data transfer errors that can occur (including BUSERR) are all | ||||||
| // rolled up into INTFLAG.bit.ERROR from STATUS.reg | ||||||
| if (sercom->I2CM.INTFLAG.bit.ERROR) { | ||||||
| if (sercom->I2CM.STATUS.bit.BUSERR) { | ||||||
|
||||||
| if (sercom->I2CM.STATUS.bit.BUSERR) { | |
| if (sercom->I2CM.INTFLAG.bit.ERROR) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment says "If a data transfer error occurs" (suggesting multiple error types), but the code now only checks for
BUSERR. Consider updating the comment to be more specific, e.g., "If a bus error occurs" or explain why only BUSERR is checked here while other similar functions check all errors viaINTFLAG.bit.ERROR.