Commit 6c6b0835db5a29f7083e8e582711a684f18ae5c6
authorDoug Szumski <d.s.szumski@gmail.com>
Mon, 27 Oct 2014 20:45:44 +0000 (21:45 +0100)
committerDoug Szumski <d.s.szumski@gmail.com>
Mon, 27 Oct 2014 20:45:44 +0000 (21:45 +0100)
  > 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

index 663357e90801164a4f60910af76684aba0f9fa44..30004e8313c83cbe3801de9fbf42209c3f95e4fc 100644 (file)
@@ -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;
        }