From 7ded58114194b75f629e0ddfafafc44083cad17c Mon Sep 17 00:00:00 2001 From: arighi Date: Tue, 13 Apr 2010 13:39:51 +0000 Subject: [PATCH] rit128x96: add distinct configuration and hardware definition files. git-svn-id: https://src.develer.com/svnoss/bertos/trunk@3427 38d2e660-2303-0410-9eaa-f027e97ec537 --- bertos/drv/lcd_rit128x96.c | 7 -- bertos/drv/lcd_rit128x96.h | 2 +- bertos/hw/hw_rit128x96.h | 81 +++++++++++++++++++ .../lm3s1968/hw/{hw_lcd.h => hw_rit128x96.h} | 9 +-- examples/lm3s1968/lm3s1968.c | 3 +- 5 files changed, 87 insertions(+), 15 deletions(-) create mode 100644 bertos/hw/hw_rit128x96.h rename examples/lm3s1968/hw/{hw_lcd.h => hw_rit128x96.h} (96%) diff --git a/bertos/drv/lcd_rit128x96.c b/bertos/drv/lcd_rit128x96.c index 7e538327..dc98055a 100644 --- a/bertos/drv/lcd_rit128x96.c +++ b/bertos/drv/lcd_rit128x96.c @@ -107,16 +107,9 @@ 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; -#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 7f607473..3aa8e760 100644 --- a/bertos/drv/lcd_rit128x96.h +++ b/bertos/drv/lcd_rit128x96.h @@ -37,7 +37,7 @@ #define LCD_LM3S_H #include /* Bitmap */ -#include +#include "hw/hw_rit128x96.h" #define LCD_WIDTH 128 #define LCD_HEIGHT 96 diff --git a/bertos/hw/hw_rit128x96.h b/bertos/hw/hw_rit128x96.h new file mode 100644 index 00000000..d1435f62 --- /dev/null +++ b/bertos/hw/hw_rit128x96.h @@ -0,0 +1,81 @@ +/** + * \file + * + * + * \brief LM3S1986: OLED-RIT-128x96 (P14201) low-level hardware macros + * + * \author Andrea Righi + */ + +#ifndef HW_RIT128x96_H +#define HW_RIT128x96_H + +#include "cfg/macros.h" /* BV() */ +#include "cfg/debug.h" + +#include +#include +#include + +/** + * \name LCD I/O pins/ports + * @{ + */ +/* OLED Data/Command control pin */ +#define GPIO_OLEDDC_PIN 0 /* Implement me! */ + +/* OLED enable pin */ +#define GPIO_OLEDEN_PIN 0 /* Implement me! */ +/*@}*/ + +/** + * \name LCD bus control macros + * @{ + */ +/* Enter command mode */ +#define LCD_SET_COMMAND() /* Implement me! */ + +/* Enter data mode */ +#define LCD_SET_DATA() /* Implement me! */ + +/* Send data to the display */ +#define LCD_WRITE(x) ((void)x)/* Implement me! */ + +/* Read data from the display */ +#define LCD_READ (0 /* Implement me! */ ) +/*@}*/ + +INLINE void lcd_bus_init(void) +{ + /* Implement me! */ +} + +#endif /* HW_RIT128x96_H */ diff --git a/examples/lm3s1968/hw/hw_lcd.h b/examples/lm3s1968/hw/hw_rit128x96.h similarity index 96% rename from examples/lm3s1968/hw/hw_lcd.h rename to examples/lm3s1968/hw/hw_rit128x96.h index ed2ede9e..495c2e56 100644 --- a/examples/lm3s1968/hw/hw_lcd.h +++ b/examples/lm3s1968/hw/hw_rit128x96.h @@ -35,12 +35,11 @@ * \author Andrea Righi */ -#ifndef HW_LCD_H -#define HW_LCD_H +#ifndef HW_RIT128x96_H +#define HW_RIT128x96_H #include "cfg/macros.h" /* BV() */ #include "cfg/debug.h" -#include "cfg/cfg_lcd.h" /* CONFIG_LCD_4BIT */ #include #include @@ -50,8 +49,6 @@ #include #include -#include - /** * \name LCD I/O pins/ports * @{ @@ -129,4 +126,4 @@ INLINE void lcd_bus_init(void) IRQ_RESTORE(flags); } -#endif /* HW_LCD_H */ +#endif /* HW_RIT128x96_H */ diff --git a/examples/lm3s1968/lm3s1968.c b/examples/lm3s1968/lm3s1968.c index a9e995e3..7aac4912 100644 --- a/examples/lm3s1968/lm3s1968.c +++ b/examples/lm3s1968/lm3s1968.c @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include @@ -47,7 +48,7 @@ #include "cfg/compiler.h" #include "cfg/cfg_gfx.h" -#include "hw/hw_lcd.h" +#include "hw/hw_rit128x96.h" #define PROC_STACK_SIZE KERN_MINSTACKSIZE -- 2.25.1