From 472dc53614981252f30b7cc4da9199a7a21678ee Mon Sep 17 00:00:00 2001 From: asterix Date: Mon, 16 Jun 2008 17:15:19 +0000 Subject: [PATCH] Reformat. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@1469 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/cfg/cfg_lcd.h | 4 ++-- bertos/cpu/arm/drv/twi_at91.c | 9 +++++---- bertos/drv/flash25.c | 6 +++--- 3 files changed, 10 insertions(+), 9 deletions(-) diff --git a/bertos/cfg/cfg_lcd.h b/bertos/cfg/cfg_lcd.h index c4974b04..5af72b71 100644 --- a/bertos/cfg/cfg_lcd.h +++ b/bertos/cfg/cfg_lcd.h @@ -41,10 +41,10 @@ #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 diff --git a/bertos/cpu/arm/drv/twi_at91.c b/bertos/cpu/arm/drv/twi_at91.c index a3b2bf73..49fd74ae 100644 --- a/bertos/cpu/arm/drv/twi_at91.c +++ b/bertos/cpu/arm/drv/twi_at91.c @@ -181,7 +181,7 @@ bool twi_read(uint8_t id, twi_iaddr_t byte1, twi_iaddr_t byte2, twi_iaddr_t byte /* * 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) { @@ -250,10 +250,10 @@ void twi_init(void) /* * 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++; @@ -265,3 +265,4 @@ void twi_init(void) MOD_INIT(twi); } + diff --git a/bertos/drv/flash25.c b/bertos/drv/flash25.c index 9dbcc49e..e2356bdf 100644 --- a/bertos/drv/flash25.c +++ b/bertos/drv/flash25.c @@ -282,7 +282,7 @@ static size_t flash25_write(struct KFile *_fd, const void *_buf, size_t size) total_write += wr_len; } - kprintf("written %u bytes\n", total_write); + kprintf("written %lu bytes\n", total_write); return total_write; } @@ -330,7 +330,7 @@ void flash25_sectorErase(KFileFlash25 *fd, Flash25Sector sector) */ 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))); } @@ -364,7 +364,7 @@ void flash25_chipErase(KFileFlash25 *fd) */ 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))); } -- 2.25.1