We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 1a7d8d0 + 11dbf85 commit a38aba7Copy full SHA for a38aba7
cores/arduino/SERCOM.cpp
@@ -568,8 +568,8 @@ bool SERCOM::sendDataMasterWIRE(uint8_t data)
568
while(!sercom->I2CM.INTFLAG.bit.MB) {
569
570
// If a bus error occurs, the MB bit may never be set.
571
- // Check the bus error bit and bail if it's set.
572
- if (sercom->I2CM.STATUS.bit.BUSERR) {
+ // Check the bus error bit and ARBLOST bit and bail if either is set.
+ if (sercom->I2CM.STATUS.bit.BUSERR || sercom->I2CM.STATUS.bit.ARBLOST) {
573
return false;
574
}
575
0 commit comments