diff options
Diffstat (limited to 'firmware/export')
-rw-r--r-- | firmware/export/config-h300.h | 9 | ||||
-rw-r--r-- | firmware/export/config-iaudiox5.h | 5 | ||||
-rw-r--r-- | firmware/export/lcd.h | 28 |
3 files changed, 35 insertions, 7 deletions
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); | |||
124 | typedef void lcd_pixelfunc_type(int x, int y); | 124 | typedef void lcd_pixelfunc_type(int x, int y); |
125 | typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits); | 125 | typedef 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) | ||
133 | struct 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 |
131 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; | 145 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; |
132 | #elif LCD_DEPTH == 2 | 146 | #elif LCD_DEPTH == 2 |
133 | #define MAX_LEVEL 3 | ||
134 | extern unsigned char lcd_framebuffer[LCD_HEIGHT/4][LCD_WIDTH]; | 147 | extern 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); | |||
167 | extern void lcd_scroll_step(int pixels); | 180 | extern void lcd_scroll_step(int pixels); |
168 | 181 | ||
169 | #if LCD_DEPTH > 1 | 182 | #if LCD_DEPTH > 1 |
183 | #ifdef HAVE_LCD_COLOR | ||
184 | extern void lcd_set_foreground(struct rgb color); | ||
185 | extern struct rgb lcd_get_foreground(void); | ||
186 | extern void lcd_set_background(struct rgb color); | ||
187 | extern struct rgb lcd_get_background(void); | ||
188 | extern void lcd_set_drawinfo(int mode, struct rgb fg_color, | ||
189 | struct rgb bg_color); | ||
190 | #else /* monochrome */ | ||
170 | extern void lcd_set_foreground(int brightness); | 191 | extern void lcd_set_foreground(int brightness); |
171 | extern int lcd_get_foreground(void); | 192 | extern int lcd_get_foreground(void); |
172 | extern void lcd_set_background(int brightness); | 193 | extern void lcd_set_background(int brightness); |
173 | extern int lcd_get_background(void); | 194 | extern int lcd_get_background(void); |
174 | extern void lcd_set_drawinfo(int mode, int fg_brightness, int bg_brightness); | 195 | extern void lcd_set_drawinfo(int mode, int fg_brightness, int bg_brightness); |
196 | #endif | ||
175 | extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y, | 197 | extern 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); |
177 | extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width, | 199 | extern 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 |