Skip to content

Commit 34d15d0

Browse files
committed
Sercom: partially revert error handling change
Revert a part of ccfc7db. It breaks I2C communcation.
1 parent 9d2183d commit 34d15d0

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

cores/arduino/SERCOM.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -605,9 +605,7 @@ bool SERCOM::sendDataMasterWIRE(uint8_t data)
605605
while(!sercom->I2CM.INTFLAG.bit.MB) {
606606
// If a data transfer error occurs, the MB bit may never be set.
607607
// Check the error bit and bail if it's set.
608-
// The data transfer errors that can occur (including BUSERR) are all
609-
// rolled up into INTFLAG.bit.ERROR from STATUS.reg
610-
if (sercom->I2CM.INTFLAG.bit.ERROR) {
608+
if (sercom->I2CM.STATUS.bit.BUSERR) {
611609
return false;
612610
}
613611
}

0 commit comments

Comments
 (0)