aboutsummaryrefslogtreecommitdiff
path: root/libraries/Wire
diff options
context:
space:
mode:
authorAlexander Entinger <consulting@lxrobotics.com>2019-09-16 11:12:37 +0200
committerGitHub <noreply@github.com>2019-09-16 11:12:37 +0200
commit786e405d54ab2151df3725366db8794b66086587 (patch)
treeea0872a58dffbc3e1983e232ca86773fd5cadf2c /libraries/Wire
parent5ed329e1c9771ba45bca0f13938adccd5a36e719 (diff)
parent13bace4bb9e37af02c36e52951399c739563f549 (diff)
Merge pull request #100 from CombiesGit/patch-1
[TWI] Add __attribute__ ((fallthrough)) to remove recent GCC warnings
Diffstat (limited to 'libraries/Wire')
-rw-r--r--libraries/Wire/src/utility/twi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/libraries/Wire/src/utility/twi.c b/libraries/Wire/src/utility/twi.c
index 171af73..1a35146 100644
--- a/libraries/Wire/src/utility/twi.c
+++ b/libraries/Wire/src/utility/twi.c
@@ -445,6 +445,7 @@ ISR(TWI_vect)
case TW_MR_DATA_ACK: // data received, ack sent
// put byte into buffer
twi_masterBuffer[twi_masterBufferIndex++] = TWDR;
+ __attribute__ ((fallthrough));
case TW_MR_SLA_ACK: // address sent, ack received
// ack if more bytes are expected, otherwise nack
if(twi_masterBufferIndex < twi_masterBufferLength){
@@ -530,6 +531,7 @@ ISR(TWI_vect)
twi_txBufferLength = 1;
twi_txBuffer[0] = 0x00;
}
+ __attribute__ ((fallthrough));
// transmit first byte from buffer, fall
case TW_ST_DATA_ACK: // byte sent, ack returned
// copy data to output register