Index: firmware/drivers/generic_i2c.c =================================================================== --- firmware/drivers/generic_i2c.c (revision 21190) +++ firmware/drivers/generic_i2c.c (working copy) @@ -40,6 +40,7 @@ iface->sda_lo(); iface->delay_hd_sta(); iface->scl_lo(); + iface->delay_hd_dat(); } static void i2c_stop(const struct i2c_interface *iface) @@ -47,6 +48,7 @@ iface->sda_output(); iface->sda_lo(); + iface->delay_hd_dat(); iface->scl_hi(); iface->delay_su_sto(); iface->sda_hi(); @@ -55,7 +57,6 @@ static void i2c_ack(const struct i2c_interface *iface, bool ack) { iface->sda_output(); - iface->scl_lo(); if ( ack ) iface->sda_lo(); else @@ -65,6 +66,7 @@ iface->scl_hi(); iface->delay_thigh(); iface->scl_lo(); + iface->delay_hd_dat(); } static int i2c_getack(const struct i2c_interface *iface) @@ -80,8 +82,6 @@ iface->delay_thigh(); iface->scl_lo(); - iface->sda_hi(); - iface->sda_output(); iface->delay_hd_dat(); return ret; } @@ -93,6 +93,7 @@ iface->sda_input(); + iface->delay_su_dat(); /* clock in each bit, MSB first */ for ( i=0x80; i; i>>=1 ) { iface->scl_hi(); @@ -127,8 +128,6 @@ iface->delay_hd_dat(); } - iface->sda_hi(); - return i2c_getack(iface); }