Skip to content

Commit

Permalink
Reduce delay
Browse files Browse the repository at this point in the history
It mow matches the ArduinoCore-avr implementation
  • Loading branch information
MCUdude committed Jan 21, 2023
1 parent 7167587 commit b50c3c4
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion avr/libraries/Wire/src/utility/twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ void twi_stop(void)
while(TWCR & _BV(TWSTO)){
if(twi_timeout_us > 0ul){
if (counter > 0ul){
_delay_us(10);
_delay_us(us_per_loop);
counter--;
} else {
twi_handleTimeout(twi_do_reset_on_timeout);
Expand Down
2 changes: 1 addition & 1 deletion avr/libraries/Wire1/src/utility/twi1.c
Original file line number Diff line number Diff line change
Expand Up @@ -444,7 +444,7 @@ void twi_stop1(void)
while(TWCR1 & _BV(TWSTO)){
if(twi_timeout_us > 0ul){
if (counter > 0ul){
_delay_us(10);
_delay_us(us_per_loop);
counter--;
} else {
twi_handleTimeout1(twi_do_reset_on_timeout);
Expand Down

0 comments on commit b50c3c4

Please sign in to comment.