Skip to content

Commit 157688a

Browse files
Update libraries/Wire/src/utility/twi.c
fix mix up using TWBR instea of TWAR! Co-Authored-By: Matthijs Kooijman <[email protected]>
1 parent 3fc5fb8 commit 157688a

File tree

1 file changed

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

1 file changed

+2
-5
lines changed

libraries/Wire/src/utility/twi.c

+2-5
Original file line numberDiff line numberDiff line change
@@ -443,11 +443,9 @@ void twi_setTimeoutInMicros(uint32_t timeout)
443443
*/
444444
void twi_handleTimeout(void)
445445
{
446-
// remember the bitrate register value
446+
// remember bitrate and address settings
447447
uint8_t previous_TWBR = TWBR;
448-
449-
// remember the address register value
450-
uint8_t previous_TWAR = TWBR;
448+
uint8_t previous_TWAR = TWAR;
451449

452450
// reset the interface
453451
twi_disable();
@@ -622,4 +620,3 @@ ISR(TWI_vect)
622620
break;
623621
}
624622
}
625-

0 commit comments

Comments
 (0)