From 6c6b0835db5a29f7083e8e582711a684f18ae5c6 Mon Sep 17 00:00:00 2001 From: Doug Szumski Date: Mon, 27 Oct 2014 21:45:44 +0100 Subject: [PATCH] twi: Remove start condition delay > This corrects a problem where a non-interrupt driven twi driver functions on the target (m32) but not in simavr. > This also fixes ../examples/board_i2ctest so that it functions as expected. --- simavr/sim/avr_twi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/simavr/sim/avr_twi.c b/simavr/sim/avr_twi.c index 663357e..30004e8 100644 --- a/simavr/sim/avr_twi.c +++ b/simavr/sim/avr_twi.c @@ -193,9 +193,9 @@ avr_twi_write( #endif // generate a start condition if (p->state & TWI_COND_START) - _avr_twi_delay_state(p, 3, TWI_REP_START); + _avr_twi_delay_state(p, 0, TWI_REP_START); else - _avr_twi_delay_state(p, 3, TWI_START); + _avr_twi_delay_state(p, 0, TWI_START); p->peer_addr = 0; p->state = TWI_COND_START; } -- 2.39.5