Skip to content

Commit d89741e

Browse files
CombiesGitaentinger
authored andcommitted
Update twi.c
Added __attribute__ ((fallthrough));
1 parent 8ffb431 commit d89741e

File tree

1 file changed

+2
-0
lines changed
  • libraries/Wire/src/utility

1 file changed

+2
-0
lines changed

Diff for: libraries/Wire/src/utility/twi.c

+2
Original file line numberDiff line numberDiff line change
@@ -445,6 +445,7 @@ ISR(TWI_vect)
445445
case TW_MR_DATA_ACK: // data received, ack sent
446446
// put byte into buffer
447447
twi_masterBuffer[twi_masterBufferIndex++] = TWDR;
448+
__attribute__ ((fallthrough));
448449
case TW_MR_SLA_ACK: // address sent, ack received
449450
// ack if more bytes are expected, otherwise nack
450451
if(twi_masterBufferIndex < twi_masterBufferLength){
@@ -530,6 +531,7 @@ ISR(TWI_vect)
530531
twi_txBufferLength = 1;
531532
twi_txBuffer[0] = 0x00;
532533
}
534+
__attribute__ ((fallthrough));
533535
// transmit first byte from buffer, fall
534536
case TW_ST_DATA_ACK: // byte sent, ack returned
535537
// copy data to output register

0 commit comments

Comments
 (0)