Generate an obviously missing STOP when having finished transmitting data.

This fixes communication with PCF8563.
This commit is contained in:
marius 2012-04-14 17:27:34 +00:00
parent 460b10f523
commit 330283063f

View File

@ -364,6 +364,7 @@ at91_twi_transfer(device_t dev, struct iic_msg *msgs, uint32_t nmsgs)
goto out;
WR4(sc, TWI_THR, *buf++);
}
WR4(sc, TWI_CR, TWI_CR_STOP);
}
if ((err = at91_twi_wait(sc, TWI_SR_TXCOMP)))
break;