#define CFG_LCD_H
/// Number bit for lcd bus
-#define CONFIG_LCD_4BIT 1
+#define CONFIG_LCD_4BIT 0
/// TODO:
-#define CONFIG_LCD_ADDRESS_FAST 1
+#define CONFIG_LCD_ADDRESS_FAST 1
/// LCD setting for 32122A (AVR implementation)
#define CONFIG_LCD_SOFTINT_REFRESH 0
/*
* 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);
}
+
total_write += wr_len;
}
- kprintf("written %u bytes\n", total_write);
+ kprintf("written %lu bytes\n", total_write);
return total_write;
}
*/
flash25_waitReady(fd);
- DB(kprintf("Erased sector [%d] in %d ms\n", sector, ticks_to_ms(timer_clock() - start_time)));
+ DB(kprintf("Erased sector [%ld] in %d ms\n", sector, ticks_to_ms(timer_clock() - start_time)));
}
*/
flash25_waitReady(fd);
- DB(kprintf("Erased all memory in %d ms\n", ticks_to_ms(timer_clock() - start_time)));
+ DB(kprintf("Erased all memory in %ld ms\n", ticks_to_ms(timer_clock() - start_time)));
}