From 8926dddf3194ac009128a7636d44f6f4efc568f3 Mon Sep 17 00:00:00 2001 From: arighi Date: Sun, 11 Apr 2010 13:46:05 +0000 Subject: [PATCH] rit128x96: fix nightly_test warnings. Fix the following nightly test warnings: ./bertos/drv/lcd_rit128x96.h:39:28: warning: drv/clock_lm3s.h: No such file or directory ./bertos/drv/lcd_rit128x96.h:40:26: warning: drv/ssi_lm3s.h: No such file or directory ./bertos/drv/lcd_rit128x96.h:41:27: warning: drv/gpio_lm3s.h: No such file or directory ./bertos/drv/lcd_rit128x96.c:110: warning: implicit declaration of function 'LCD_WRITE' ./bertos/drv/lcd_rit128x96.c:112: warning: implicit declaration of function 'LCD_READ' ./bertos/drv/lcd_rit128x96.c:122: warning: implicit declaration of function 'LCD_SET_COMMAND' ./bertos/drv/lcd_rit128x96.c:162: warning: implicit declaration of function 'LCD_SET_DATA' git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3414 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/lcd_rit128x96.c | 9 ++++- bertos/drv/lcd_rit128x96.h | 3 -- bertos/hw/hw_lcd.h | 6 +++ examples/lm3s1968/cfg/cfg_lcd.h | 68 +++++++++++++++++++++++++++++++++ examples/lm3s1968/hw/hw_lcd.h | 3 +- 5 files changed, 84 insertions(+), 5 deletions(-) create mode 100644 examples/lm3s1968/cfg/cfg_lcd.h diff --git a/bertos/drv/lcd_rit128x96.c b/bertos/drv/lcd_rit128x96.c index 216237d8..7e538327 100644 --- a/bertos/drv/lcd_rit128x96.c +++ b/bertos/drv/lcd_rit128x96.c @@ -107,9 +107,16 @@ static void lcd_dataWrite(const uint8_t *buf, size_t count) { while (count--) { +#if !CONFIG_LCD_4BIT LCD_WRITE(*buf++); /* Dummy read to drain the FIFO */ - (void)LCD_READ(); + (void)LCD_READ; +#else + LCD_WRITE_H(*buf); + LCD_WRITE_L(*buf++); + (void)LCD_READ_H; + (void)LCD_READ_L; +#endif } } diff --git a/bertos/drv/lcd_rit128x96.h b/bertos/drv/lcd_rit128x96.h index aaebd48a..7f607473 100644 --- a/bertos/drv/lcd_rit128x96.h +++ b/bertos/drv/lcd_rit128x96.h @@ -36,9 +36,6 @@ #ifndef LCD_LM3S_H #define LCD_LM3S_H -#include -#include -#include #include /* Bitmap */ #include diff --git a/bertos/hw/hw_lcd.h b/bertos/hw/hw_lcd.h index 3a206a0f..21b64d4e 100644 --- a/bertos/hw/hw_lcd.h +++ b/bertos/hw/hw_lcd.h @@ -95,6 +95,12 @@ #define LCD_CLR_E /* Implement me! */ #define LCD_SET_E /* Implement me! */ +/* Enter command mode */ +#define LCD_SET_COMMAND() /* Implement me! */ + +/* Enter data mode */ +#define LCD_SET_DATA() /* Implement me! */ + #if CONFIG_LCD_4BIT #define LCD_WRITE_H(x) ((void)x)/* Implement me! */ #define LCD_WRITE_L(x) ((void)x)/* Implement me! */ diff --git a/examples/lm3s1968/cfg/cfg_lcd.h b/examples/lm3s1968/cfg/cfg_lcd.h new file mode 100644 index 00000000..d48fa5df --- /dev/null +++ b/examples/lm3s1968/cfg/cfg_lcd.h @@ -0,0 +1,68 @@ +/** + * \file + * + * + * \brief Configuration file for lcd display module. + */ + +#ifndef CFG_LCD_H +#define CFG_LCD_H + +/** + * Use 4 bit addressing mode. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_4BIT 0 + +/** + * Use a table to speed up LCD memory addressing. + * This will use about 100 bytes of RAM. + * $WIZ$ type = "boolean" + */ +#define CONFIG_LCD_ADDRESS_FAST 0 + +/** + * LCD setting for 32122A (AVR implementation). + * $WIZ$ type = "boolean" + * $WIZ$ supports = "avr and False" + */ +#define CONFIG_LCD_SOFTINT_REFRESH 0 + +/** + * LCD setting for 32122A (AVR implementation). + * $WIZ$ type = "boolean" + * $WIZ$ supports = "avr and False" + */ +#define CONFIG_LCD_WAIT 0 + + +#endif /* CFG_LCD_H */ + diff --git a/examples/lm3s1968/hw/hw_lcd.h b/examples/lm3s1968/hw/hw_lcd.h index dd2d88d7..4a6ceb9d 100644 --- a/examples/lm3s1968/hw/hw_lcd.h +++ b/examples/lm3s1968/hw/hw_lcd.h @@ -40,6 +40,7 @@ #include "cfg/macros.h" /* BV() */ #include "cfg/debug.h" +#include "cfg/cfg_lcd.h" /* CONFIG_LCD_4BIT */ #include #include @@ -78,7 +79,7 @@ #define LCD_WRITE(x) lm3s_ssiWriteFrame(SSI0_BASE, x) /* Read data from the display */ -#define LCD_READ() \ +#define LCD_READ \ ({ \ uint32_t frame; \ lm3s_ssiReadFrame(SSI0_BASE, &frame); \ -- 2.25.1