Skip to content

Commit

Permalink
Workaround for SimAvr Issue buserror#453 - update status immediately
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesrwaugh committed Apr 23, 2024
1 parent d51f593 commit a96518b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions simavr/sim/avr_twi.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,11 +289,11 @@ avr_twi_write(
avr_twi_irq_msg(msgv, p->peer_addr, avr->data[p->r_twdr]));

if (do_read) { // read ?
_avr_twi_delay_state(p, 9,
_avr_twi_delay_state(p, 0,
msgv & TWI_COND_ACK ?
TWI_MRX_DATA_ACK : TWI_MRX_DATA_NACK);
} else {
_avr_twi_delay_state(p, 9,
_avr_twi_delay_state(p, 0,
p->state & TWI_COND_ACK ?
TWI_MTX_DATA_ACK : TWI_MTX_DATA_NACK);
}
Expand Down

0 comments on commit a96518b

Please sign in to comment.