/*
* Start reception.
* Kludge: if we want to receive only 1 byte, the stop but *must* be set here
- * (thanks to crappy twi implementation again).
+ * (thanks to crappy twi implementation again).
*/
if (size == 1)
{
/*
* Compute twi clock.
* CLDIV = ((Tlow * 2^CKDIV) -3) * Tmck
- * CHDIV = ((THigh * 2^CKDIV) -3) * Tmck
- * Only CLDIV is computed since CLDIV = CHDIV (50% duty cycle)
+ * CHDIV = ((THigh * 2^CKDIV) -3) * Tmck
+ * Only CLDIV is computed since CLDIV = CHDIV (50% duty cycle)
*/
- uint16_t cldiv, ckdiv = 0;
+ uint16_t cldiv, ckdiv = 0;
while ((cldiv = ((CLOCK_FREQ / (2 * CONFIG_TWI_FREQ)) - 3) / (1 << ckdiv)) > 255)
ckdiv++;
MOD_INIT(twi);
}
+