summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/SOURCES4
-rw-r--r--firmware/export/config-h300.h9
-rw-r--r--firmware/export/config-iaudiox5.h5
-rw-r--r--firmware/export/lcd.h28
4 files changed, 37 insertions, 9 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES
index 2fca3ffab5..afb36f490d 100644
--- a/firmware/SOURCES
+++ b/firmware/SOURCES
@@ -49,9 +49,9 @@ drivers/lcd-player-charset.c
49drivers/lcd-player.c 49drivers/lcd-player.c
50#endif 50#endif
51#ifdef HAVE_LCD_BITMAP 51#ifdef HAVE_LCD_BITMAP
52#if CONFIG_LCD == LCD_S1D15E06 52#if LCD_DEPTH == 2
53drivers/lcd-h100.c 53drivers/lcd-h100.c
54#else 54#elif LCD_DEPTH == 1
55drivers/lcd-recorder.c 55drivers/lcd-recorder.c
56#endif 56#endif
57#endif 57#endif
diff --git a/firmware/export/config-h300.h b/firmware/export/config-h300.h
index 1c284b9ef8..be6511cb2f 100644
--- a/firmware/export/config-h300.h
+++ b/firmware/export/config-h300.h
@@ -1,16 +1,19 @@
1/* For Rolo and boot loader */
2#define MODEL_NUMBER 2
3
1/* define this if you have recording possibility */ 4/* define this if you have recording possibility */
2/*#define HAVE_RECORDING 1*/ 5/*#define HAVE_RECORDING 1*/
3 6
4/* define this if you have a bitmap LCD display */ 7/* define this if you have a bitmap LCD display */
5#define HAVE_LCD_BITMAP 1 8#define HAVE_LCD_BITMAP 1
6 9
7/* For Rolo and boot loader */ 10/* define this if you have a colour LCD */
8#define MODEL_NUMBER 2 11#define HAVE_LCD_COLOR 1
9 12
10/* LCD dimensions */ 13/* LCD dimensions */
11#define LCD_WIDTH 220 14#define LCD_WIDTH 220
12#define LCD_HEIGHT 176 15#define LCD_HEIGHT 176
13#define LCD_DEPTH 18 16#define LCD_DEPTH 18 /* 262.144 colours */
14 17
15/* remote LCD */ 18/* remote LCD */
16#define LCD_REMOTE_WIDTH 128 19#define LCD_REMOTE_WIDTH 128
diff --git a/firmware/export/config-iaudiox5.h b/firmware/export/config-iaudiox5.h
index 6894fe2ca5..1a95a5202c 100644
--- a/firmware/export/config-iaudiox5.h
+++ b/firmware/export/config-iaudiox5.h
@@ -8,10 +8,13 @@
8/* define this if you have a bitmap LCD display */ 8/* define this if you have a bitmap LCD display */
9#define HAVE_LCD_BITMAP 1 9#define HAVE_LCD_BITMAP 1
10 10
11/* define this if you have a colour LCD */
12#define HAVE_LCD_COLOR 1
13
11/* LCD dimensions */ 14/* LCD dimensions */
12#define LCD_WIDTH 160 15#define LCD_WIDTH 160
13#define LCD_HEIGHT 128 16#define LCD_HEIGHT 128
14#define LCD_DEPTH 18 /* 260.000 colors */ 17#define LCD_DEPTH 18 /* 262.144 colors */
15 18
16/* remote LCD */ 19/* remote LCD */
17#define LCD_REMOTE_WIDTH 128 20#define LCD_REMOTE_WIDTH 128
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index 6860d8f064..30677e492e 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -124,13 +124,26 @@ extern void lcd_jump_scroll_delay(int ms);
124typedef void lcd_pixelfunc_type(int x, int y); 124typedef void lcd_pixelfunc_type(int x, int y);
125typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); 125typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits);
126 126
127#if defined(HAVE_LCD_BITMAP) || defined(SIMULATOR) 127#ifdef HAVE_LCD_BITMAP
128
129#ifdef HAVE_LCD_COLOR
130#define LCD_MAX_RED ((1 << (LCD_DEPTH/3)) - 1)
131#define LCD_MAX_GREEN ((1 << (LCD_DEPTH/3)) - 1)
132#define LCD_MAX_BLUE ((1 << (LCD_DEPTH/3)) - 1)
133struct rgb {
134 unsigned char red;
135 unsigned char green;
136 unsigned char blue;
137};
138#else /* monochrome */
139#define LCD_MAX_LEVEL ((1 << LCD_DEPTH) - 1)
140
141#endif
128 142
129/* Memory copy of display bitmap */ 143/* Memory copy of display bitmap */
130#if LCD_DEPTH == 1 144#if LCD_DEPTH == 1
131extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; 145extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];
132#elif LCD_DEPTH == 2 146#elif LCD_DEPTH == 2
133#define MAX_LEVEL 3
134extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; 147extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH];
135#endif 148#endif
136 149
@@ -167,11 +180,20 @@ extern void lcd_bidir_scroll(int threshold);
167extern void lcd_scroll_step(int pixels); 180extern void lcd_scroll_step(int pixels);
168 181
169#if LCD_DEPTH > 1 182#if LCD_DEPTH > 1
183#ifdef HAVE_LCD_COLOR
184extern void lcd_set_foreground(struct rgb color);
185extern struct rgb lcd_get_foreground(void);
186extern void lcd_set_background(struct rgb color);
187extern struct rgb lcd_get_background(void);
188extern void lcd_set_drawinfo(int mode, struct rgb fg_color,
189 struct rgb bg_color);
190#else /* monochrome */
170extern void lcd_set_foreground(int brightness); 191extern void lcd_set_foreground(int brightness);
171extern int lcd_get_foreground(void); 192extern int lcd_get_foreground(void);
172extern void lcd_set_background(int brightness); 193extern void lcd_set_background(int brightness);
173extern int lcd_get_background(void); 194extern int lcd_get_background(void);
174extern void lcd_set_drawinfo(int mode, int fg_brightness, int bg_brightness); 195extern void lcd_set_drawinfo(int mode, int fg_brightness, int bg_brightness);
196#endif
175extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, 197extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
176 int stride, int x, int y, int width, int height); 198 int stride, int x, int y, int width, int height);
177extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, 199extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width,
@@ -181,7 +203,7 @@ extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width,
181#define lcd_mono_bitmap_part lcd_bitmap_part 203#define lcd_mono_bitmap_part lcd_bitmap_part
182#endif 204#endif
183 205
184#endif /* CHARCELLS / BITMAP */ 206#endif /* HAVE_LCD_BITMAP */
185 207
186/* internal usage, but in multiple drivers */ 208/* internal usage, but in multiple drivers */
187#ifdef HAVE_LCD_BITMAP 209#ifdef HAVE_LCD_BITMAP