Skip to content

Commit 0359948

Browse files
committed
Use fallthrough comment instead of attribute
For backwards compatibility with avr-gcc 5
1 parent ff3f6d6 commit 0359948

File tree

2 files changed

+4
-4
lines changed
  • avr/libraries

2 files changed

+4
-4
lines changed

avr/libraries/Wire/src/utility/twi.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +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));
448+
/* fall through */
449449
case TW_MR_SLA_ACK: // address sent, ack received
450450
// ack if more bytes are expected, otherwise nack
451451
if(twi_masterBufferIndex < twi_masterBufferLength){
@@ -532,7 +532,7 @@ ISR(TWI_vect)
532532
twi_txBuffer[0] = 0x00;
533533
}
534534
// transmit first byte from buffer, fall
535-
__attribute__ ((fallthrough));
535+
/* fall through */
536536
case TW_ST_DATA_ACK: // byte sent, ack returned
537537
// copy data to output register
538538
TWDR = twi_txBuffer[twi_txBufferIndex++];

avr/libraries/Wire1/src/utility/twi1.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ ISR(TWI1_vect)
446446
case TW_MR_DATA_ACK: // data received, ack sent
447447
// put byte into buffer
448448
twi_masterBuffer[twi_masterBufferIndex++] = TWDR1;
449-
__attribute__ ((fallthrough));
449+
/* fall through */
450450
case TW_MR_SLA_ACK: // address sent, ack received
451451
// ack if more bytes are expected, otherwise nack
452452
if(twi_masterBufferIndex < twi_masterBufferLength){
@@ -533,7 +533,7 @@ ISR(TWI1_vect)
533533
twi_txBuffer[0] = 0x00;
534534
}
535535
// transmit first byte from buffer, fall
536-
__attribute__ ((fallthrough));
536+
/* fall through */
537537
case TW_ST_DATA_ACK: // byte sent, ack returned
538538
// copy data to output register
539539
TWDR1 = twi_txBuffer[twi_txBufferIndex++];

0 commit comments

Comments
 (0)