fuze+: scramble bootloader file
[maemo-rb.git] / firmware / export / lcd.h
blobf4336233ab6695abdf67e60b4f89b9da86e2b204
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Alan Korr
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __LCD_H__
23 #define __LCD_H__
25 #include <stdbool.h>
26 #include "cpu.h"
27 #include "config.h"
28 #include "events.h"
30 #define VP_FLAG_ALIGN_RIGHT 0x01
31 #define VP_FLAG_ALIGN_CENTER 0x02
33 #define VP_FLAG_ALIGNMENT_MASK \
34 (VP_FLAG_ALIGN_RIGHT|VP_FLAG_ALIGN_CENTER)
36 #define VP_IS_RTL(vp) (((vp)->flags & VP_FLAG_ALIGNMENT_MASK) == VP_FLAG_ALIGN_RIGHT)
38 struct viewport {
39 int x;
40 int y;
41 int width;
42 int height;
43 #ifdef HAVE_LCD_BITMAP
44 int flags;
45 int font;
46 int line_height; /* 0 for using font height */
47 int drawmode;
48 #endif
49 #if LCD_DEPTH > 1
50 unsigned fg_pattern;
51 unsigned bg_pattern;
52 #ifdef HAVE_LCD_COLOR
53 unsigned lss_pattern;
54 unsigned lse_pattern;
55 unsigned lst_pattern;
56 #endif
57 #endif
60 /* Frame buffer stride
62 * Stride describes the amount that you need to increment to get to the next
63 * line. For screens that have the pixels in contiguous horizontal strips
64 * stride should be equal to the image width.
66 * For example, if the screen pixels are layed out as follows:
68 * width0 width1 width2 widthX-1
69 * ------ ------ ------ ------------------ --------
70 * height0 | pixel0 pixel1 pixel2 ----------------> pixelX-1
71 * height1 | pixelX
73 * then you need to add X pixels to get to the next line. (the next line
74 * in this case is height1).
76 * Similarly, if the screen has the pixels in contiguous vertical strips
77 * the stride would be equal to the image height.
79 * For example if the screen pixels are layed out as follows:
81 * width0 width1
82 * ------ ------
83 * height0 | pixel0 pixelY
84 * height1 | pixel1
85 * height2 | pixel2
86 * | | |
87 * \|/ | \|/
88 * heightY-1 | pixelY-1
90 * then you would need to add Y pixels to get to the next line (the next
91 * line in this case is from width0 to width1).
93 * The remote might have a different stride than the main screen so the screen
94 * number needs to be passed to the STRIDE macro so that the appropriate height
95 * or width can be passed to the lcd_bitmap, or lcd_remote_bitmap calls.
97 * STRIDE_REMOTE and STRIDE_MAIN should never be used when it is not clear whether
98 * lcd_remote_bitmap calls or lcd_bitmap calls are being made (for example the
99 * screens api).
101 * Screen should always use the screen_type enum that is at the top of this
102 * header.
104 enum screen_type {
105 SCREEN_MAIN
106 #ifdef HAVE_REMOTE_LCD
107 ,SCREEN_REMOTE
108 #endif
111 #if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
112 #define STRIDE_MAIN(w, h) (h)
113 #else
114 #define STRIDE_MAIN(w, h) (w)
115 #endif
117 #define STRIDE_REMOTE(w, h) (w)
119 #define STRIDE(screen, w, h) (screen==SCREEN_MAIN?STRIDE_MAIN((w), \
120 (h)):STRIDE_REMOTE((w),(h)))
122 #define STYLE_DEFAULT 0x00000000
123 #define STYLE_COLORED 0x10000000
124 #define STYLE_INVERT 0x20000000
125 #define STYLE_COLORBAR 0x40000000
126 #define STYLE_GRADIENT 0x80000000
127 #define STYLE_MODE_MASK 0xF0000000
128 #define STYLE_COLOR_MASK 0x0000FFFF
129 #ifdef HAVE_LCD_COLOR
130 #define STYLE_CURLN_MASK 0x0000FF00
131 #define STYLE_MAXLN_MASK 0x000000FF
132 #define CURLN_PACK(x) (((x)<<8) & STYLE_CURLN_MASK)
133 #define CURLN_UNPACK(x) ((unsigned char)(((x)&STYLE_CURLN_MASK) >> 8))
134 #define NUMLN_PACK(x) ((x) & STYLE_MAXLN_MASK)
135 #define NUMLN_UNPACK(x) ((unsigned char)((x) & STYLE_MAXLN_MASK))
136 #endif
138 #ifdef HAVE_LCD_BITMAP
139 #if LCD_DEPTH <=8
140 #if (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) \
141 || (LCD_PIXELFORMAT == HORIZONTAL_INTERLEAVED)
142 typedef unsigned short fb_data;
143 #define FB_DATA_SZ 2
144 #else
145 typedef unsigned char fb_data;
146 #define FB_DATA_SZ 1
147 #endif
148 #elif LCD_DEPTH <= 16
149 typedef unsigned short fb_data;
150 #define FB_DATA_SZ 2
151 #else /* LCD_DEPTH > 16 */
152 typedef unsigned long fb_data;
153 #define FB_DATA_SZ 4
154 #endif /* LCD_DEPTH */
156 #else /* LCD_CHARCELLS */
157 typedef unsigned char fb_data;
158 #endif
160 #if defined(HAVE_LCD_MODES)
161 void lcd_set_mode(int mode);
162 #define LCD_MODE_RGB565 0x00000001
163 #define LCD_MODE_YUV 0x00000002
164 #define LCD_MODE_PAL256 0x00000004
166 #if HAVE_LCD_MODES & LCD_MODE_PAL256
167 void lcd_blit_pal256(unsigned char *src, int src_x, int src_y, int x, int y,
168 int width, int height);
169 void lcd_pal256_update_pal(fb_data *palette);
170 #endif
171 #endif
174 /* common functions */
175 extern void lcd_write_command(int byte);
176 extern void lcd_write_command_e(int cmd, int data);
177 extern void lcd_write_command_ex(int cmd, int data1, int data2);
178 extern void lcd_write_data(const fb_data* p_bytes, int count);
179 extern void lcd_init(void) INIT_ATTR;
180 extern void lcd_init_device(void) INIT_ATTR;
182 extern void lcd_backlight(bool on);
183 extern int lcd_default_contrast(void);
184 extern void lcd_set_contrast(int val);
185 extern int lcd_getwidth(void);
186 extern int lcd_getheight(void);
187 extern int lcd_getstringsize(const unsigned char *str, int *w, int *h);
189 extern void lcd_set_viewport(struct viewport* vp);
190 extern void lcd_update(void);
191 extern void lcd_update_viewport(void);
192 extern void lcd_clear_viewport(void);
193 extern void lcd_clear_display(void);
194 extern void lcd_putsxy(int x, int y, const unsigned char *string);
195 extern void lcd_putsxyf(int x, int y, const unsigned char *fmt, ...);
196 extern void lcd_putsxy_style_offset(int x, int y, const unsigned char *str,
197 int style, int offset);
198 extern void lcd_puts(int x, int y, const unsigned char *string);
199 extern void lcd_putsf(int x, int y, const unsigned char *fmt, ...);
200 extern void lcd_puts_style(int x, int y, const unsigned char *string, int style);
201 extern void lcd_puts_offset(int x, int y, const unsigned char *str, int offset);
202 extern void lcd_puts_scroll_offset(int x, int y, const unsigned char *string,
203 int offset);
204 extern void lcd_putc(int x, int y, unsigned long ucs);
205 extern void lcd_stop_scroll(void);
206 extern void lcd_bidir_scroll(int threshold);
207 extern void lcd_scroll_speed(int speed);
208 extern void lcd_scroll_delay(int ms);
209 extern void lcd_puts_scroll(int x, int y, const unsigned char* string);
210 extern void lcd_puts_scroll_style(int x, int y, const unsigned char* string,
211 int style);
213 #ifdef HAVE_LCD_BITMAP
215 /* performance function */
216 #if defined(HAVE_LCD_COLOR)
217 #if MEMORYSIZE > 2
218 #define LCD_YUV_DITHER 0x1
219 extern void lcd_yuv_set_options(unsigned options);
220 extern void lcd_blit_yuv(unsigned char * const src[3],
221 int src_x, int src_y, int stride,
222 int x, int y, int width, int height);
223 #endif /* MEMORYSIZE > 2 */
224 #else
225 extern void lcd_blit_mono(const unsigned char *data, int x, int by, int width,
226 int bheight, int stride);
227 extern void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases,
228 int bx, int by, int bwidth, int bheight,
229 int stride);
230 #endif
233 /* update a fraction of the screen */
234 extern void lcd_update_rect(int x, int y, int width, int height);
235 extern void lcd_update_viewport_rect(int x, int y, int width, int height);
237 #ifdef HAVE_REMOTE_LCD
238 extern void lcd_remote_update(void);
239 /* update a fraction of the screen */
240 extern void lcd_remote_update_rect(int x, int y, int width, int height);
241 #endif /* HAVE_REMOTE_LCD */
242 #endif /* HAVE_LCD_BITMAP */
244 #ifdef HAVE_LCD_CHARCELLS
246 /* Icon definitions for lcd_icon() */
247 enum
249 ICON_BATTERY = 0,
250 ICON_BATTERY_1,
251 ICON_BATTERY_2,
252 ICON_BATTERY_3,
253 ICON_USB,
254 ICON_PLAY,
255 ICON_RECORD,
256 ICON_PAUSE,
257 ICON_AUDIO,
258 ICON_REPEAT,
259 ICON_1,
260 ICON_VOLUME,
261 ICON_VOLUME_1,
262 ICON_VOLUME_2,
263 ICON_VOLUME_3,
264 ICON_VOLUME_4,
265 ICON_VOLUME_5,
266 ICON_PARAM
269 void lcd_icon(int icon, bool enable);
270 void lcd_double_height(bool on);
271 void lcd_define_pattern(unsigned long ucs, const char *pattern);
272 unsigned long lcd_get_locked_pattern(void);
273 void lcd_unlock_pattern(unsigned long ucs);
274 void lcd_put_cursor(int x, int y, unsigned long cursor_ucs);
275 void lcd_remove_cursor(void);
276 #define JUMP_SCROLL_ALWAYS 5
277 extern void lcd_jump_scroll(int mode); /* 0=off, 1=once, ..., ALWAYS */
278 extern void lcd_jump_scroll_delay(int ms);
279 #endif /* HAVE_LCD_CHARCELLS */
281 /* Draw modes */
282 #define DRMODE_COMPLEMENT 0
283 #define DRMODE_BG 1
284 #define DRMODE_FG 2
285 #define DRMODE_SOLID 3
286 #define DRMODE_INVERSEVID 4 /* used as bit modifier for basic modes */
288 /* Low-level drawing function types */
289 typedef void lcd_pixelfunc_type(int x, int y);
290 typedef void lcd_blockfunc_type(fb_data *address, unsigned mask, unsigned bits);
291 #if LCD_DEPTH >= 8
292 typedef void lcd_fastpixelfunc_type(fb_data *address);
293 #endif
295 #ifdef HAVE_LCD_BITMAP
297 #if defined(HAVE_LCD_COLOR) && defined(LCD_REMOTE_DEPTH) && \
298 LCD_REMOTE_DEPTH > 1
299 /* Just return color for screens use */
300 static inline unsigned lcd_color_to_native(unsigned color)
301 { return color; }
302 #define SCREEN_COLOR_TO_NATIVE(screen, color) (screen)->color_to_native(color)
303 #else
304 #define SCREEN_COLOR_TO_NATIVE(screen, color) (color)
305 #endif
307 #ifdef HAVE_LCD_COLOR
308 #if LCD_PIXELFORMAT == RGB565 || LCD_PIXELFORMAT == RGB565SWAPPED
309 #define LCD_MAX_RED 31
310 #define LCD_MAX_GREEN 63
311 #define LCD_MAX_BLUE 31
312 #define LCD_RED_BITS 5
313 #define LCD_GREEN_BITS 6
314 #define LCD_BLUE_BITS 5
316 /* pack/unpack native RGB values */
317 #define _RGBPACK_LCD(r, g, b) ( ((r) << 11) | ((g) << 5) | (b) )
318 #define _RGB_UNPACK_RED_LCD(x) ( (((x) >> 11) ) )
319 #define _RGB_UNPACK_GREEN_LCD(x) ( (((x) >> 5) & 0x3f) )
320 #define _RGB_UNPACK_BLUE_LCD(x) ( (((x) ) & 0x1f) )
322 /* pack/unpack 24-bit RGB values */
323 #define _RGBPACK(r, g, b) _RGBPACK_LCD((r) >> 3, (g) >> 2, (b) >> 3)
324 #define _RGB_UNPACK_RED(x) ( (((x) >> 8) & 0xf8) | (((x) >> 13) & 0x07) )
325 #define _RGB_UNPACK_GREEN(x) ( (((x) >> 3) & 0xfc) | (((x) >> 9) & 0x03) )
326 #define _RGB_UNPACK_BLUE(x) ( (((x) << 3) & 0xf8) | (((x) >> 2) & 0x07) )
328 #if (LCD_PIXELFORMAT == RGB565SWAPPED)
329 /* RGB3553 */
330 #define _LCD_UNSWAP_COLOR(x) swap16(x)
331 #define LCD_RGBPACK_LCD(r, g, b) ( (((r) << 3) ) | \
332 (((g) >> 3) ) | \
333 (((g) & 0x07) << 13) | \
334 (((b) << 8) ) )
335 #define LCD_RGBPACK(r, g, b) ( (((r) >> 3) << 3) | \
336 (((g) >> 5) ) | \
337 (((g) & 0x1c) << 11) | \
338 (((b) >> 3) << 8) )
339 /* swap color once - not currenly used in static inits */
340 #define _SWAPUNPACK(x, _unp_) \
341 ({ typeof (x) _x_ = swap16(x); _unp_(_x_); })
342 #define RGB_UNPACK_RED(x) _SWAPUNPACK((x), _RGB_UNPACK_RED)
343 #define RGB_UNPACK_GREEN(x) _SWAPUNPACK((x), _RGB_UNPACK_GREEN)
344 #define RGB_UNPACK_BLUE(x) _SWAPUNPACK((x), _RGB_UNPACK_BLUE)
345 #define RGB_UNPACK_RED_LCD(x) _SWAPUNPACK((x), _RGB_UNPACK_RED_LCD)
346 #define RGB_UNPACK_GREEN_LCD(x) _SWAPUNPACK((x), _RGB_UNPACK_GREEN_LCD)
347 #define RGB_UNPACK_BLUE_LCD(x) _SWAPUNPACK((x), _RGB_UNPACK_BLUE_LCD)
348 #else /* LCD_PIXELFORMAT == RGB565 */
349 /* RGB565 */
350 #define _LCD_UNSWAP_COLOR(x) (x)
351 #define LCD_RGBPACK(r, g, b) _RGBPACK((r), (g), (b))
352 #define LCD_RGBPACK_LCD(r, g, b) _RGBPACK_LCD((r), (g), (b))
353 #define RGB_UNPACK_RED(x) _RGB_UNPACK_RED(x)
354 #define RGB_UNPACK_GREEN(x) _RGB_UNPACK_GREEN(x)
355 #define RGB_UNPACK_BLUE(x) _RGB_UNPACK_BLUE(x)
356 #define RGB_UNPACK_RED_LCD(x) _RGB_UNPACK_RED_LCD(x)
357 #define RGB_UNPACK_GREEN_LCD(x) _RGB_UNPACK_GREEN_LCD(x)
358 #define RGB_UNPACK_BLUE_LCD(x) _RGB_UNPACK_BLUE_LCD(x)
359 #endif /* RGB565* */
360 #else
361 /* other colour depths */
362 #endif
364 #define LCD_BLACK LCD_RGBPACK(0, 0, 0)
365 #define LCD_DARKGRAY LCD_RGBPACK(85, 85, 85)
366 #define LCD_LIGHTGRAY LCD_RGBPACK(170, 170, 170)
367 #define LCD_WHITE LCD_RGBPACK(255, 255, 255)
368 #define LCD_DEFAULT_FG LCD_WHITE
369 #define LCD_DEFAULT_BG LCD_BLACK
370 #define LCD_DEFAULT_LS LCD_WHITE
372 #elif LCD_DEPTH > 1 /* greyscale */
374 #define LCD_MAX_LEVEL ((1 << LCD_DEPTH) - 1)
375 #define LCD_BRIGHTNESS(y) (((y) * LCD_MAX_LEVEL + 127) / 255)
377 #define LCD_BLACK LCD_BRIGHTNESS(0)
378 #define LCD_DARKGRAY LCD_BRIGHTNESS(85)
379 #define LCD_LIGHTGRAY LCD_BRIGHTNESS(170)
380 #define LCD_WHITE LCD_BRIGHTNESS(255)
381 #define LCD_DEFAULT_FG LCD_BLACK
382 #define LCD_DEFAULT_BG LCD_WHITE
384 #endif /* HAVE_LCD_COLOR */
386 /* Frame buffer dimensions */
387 #if LCD_DEPTH == 1
388 #if LCD_PIXELFORMAT == HORIZONTAL_PACKING
389 #define LCD_FBWIDTH ((LCD_WIDTH+7)/8)
390 #else /* LCD_PIXELFORMAT == VERTICAL_PACKING */
391 #define LCD_FBHEIGHT ((LCD_HEIGHT+7)/8)
392 #endif /* LCD_PIXELFORMAT */
393 #elif LCD_DEPTH == 2
394 #if LCD_PIXELFORMAT == HORIZONTAL_PACKING
395 #define LCD_FBWIDTH ((LCD_WIDTH+3)/4)
396 #elif LCD_PIXELFORMAT == VERTICAL_PACKING
397 #define LCD_FBHEIGHT ((LCD_HEIGHT+3)/4)
398 #elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED
399 #define LCD_FBHEIGHT ((LCD_HEIGHT+7)/8)
400 #endif /* LCD_PIXELFORMAT */
401 #endif /* LCD_DEPTH */
402 /* Set defaults if not defined different yet. The defaults apply to both
403 * dimensions for LCD_DEPTH >= 8 */
404 #ifndef LCD_FBWIDTH
405 #define LCD_FBWIDTH LCD_WIDTH
406 #endif
407 #ifndef LCD_FBHEIGHT
408 #define LCD_FBHEIGHT LCD_HEIGHT
409 #endif
410 /* The actual framebuffer */
411 extern fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH];
413 /** Port-specific functions. Enable in port config file. **/
414 #ifdef HAVE_REMOTE_LCD_AS_MAIN
415 void lcd_on(void);
416 void lcd_off(void);
417 void lcd_poweroff(void);
418 #endif
420 #ifdef HAVE_LCD_ENABLE
421 /* Enable/disable the main display. */
422 extern void lcd_enable(bool on);
423 #endif /* HAVE_LCD_ENABLE */
425 #ifdef HAVE_LCD_SLEEP
426 /* Put the LCD into a power saving state deeper than lcd_enable(false). */
427 extern void lcd_sleep(void);
428 #endif /* HAVE_LCD_SLEEP */
429 #if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
430 /* Register a hook that is called when the lcd is powered and after the
431 * framebuffer data is synchronized */
432 /* Sansa Clip has these function in it's lcd driver, since it's the only
433 * 1-bit display featuring lcd_active, so far */
435 enum {
436 LCD_EVENT_ACTIVATION = (EVENT_CLASS_LCD|1),
439 extern bool lcd_active(void);
440 #endif
442 #ifdef HAVE_LCD_SHUTDOWN
443 extern void lcd_shutdown(void);
444 #endif
446 /* Bitmap formats */
447 enum
449 FORMAT_MONO,
450 FORMAT_NATIVE,
451 FORMAT_ANY /* For passing to read_bmp_file() */
454 #define FORMAT_TRANSPARENT 0x40000000
455 #define FORMAT_DITHER 0x20000000
456 #define FORMAT_REMOTE 0x10000000
457 #define FORMAT_RESIZE 0x08000000
458 #define FORMAT_KEEP_ASPECT 0x04000000
459 #define FORMAT_RETURN_SIZE 0x02000000
461 #define TRANSPARENT_COLOR LCD_RGBPACK(255,0,255)
462 #define REPLACEWITHFG_COLOR LCD_RGBPACK(0,255,255)
464 struct bitmap {
465 int width;
466 int height;
467 #if (LCD_DEPTH > 1) || defined(HAVE_REMOTE_LCD) && (LCD_REMOTE_DEPTH > 1)
468 int format;
469 unsigned char *maskdata;
470 #endif
471 unsigned char *data;
474 extern void lcd_set_invert_display(bool yesno);
475 #ifdef HAVE_BACKLIGHT_INVERSION
476 extern void lcd_set_backlight_inversion(bool yesno);
477 #endif /* HAVE_BACKLIGHT_INVERSION */
478 extern void lcd_set_flip(bool yesno);
480 extern void lcd_set_drawmode(int mode);
481 extern int lcd_get_drawmode(void);
482 extern void lcd_setfont(int font);
483 extern int lcd_getfont(void);
485 extern void lcd_puts_style_offset(int x, int y, const unsigned char *str,
486 int style, int x_offset);
487 extern void lcd_puts_style_xyoffset(int x, int y, const unsigned char *str,
488 int style, int x_offset, int y_offset);
489 extern void lcd_puts_scroll_style_offset(int x, int y, const unsigned char *string,
490 int style, int x_offset);
491 extern void lcd_puts_scroll_style_xyoffset(int x, int y, const unsigned char *string,
492 int style, int x_offset, int y_offset);
494 /* low level drawing function pointer arrays */
495 #if LCD_DEPTH >= 8
496 extern lcd_fastpixelfunc_type* const *lcd_fastpixelfuncs;
497 #elif LCD_DEPTH > 1
498 extern lcd_pixelfunc_type* const *lcd_pixelfuncs;
499 extern lcd_blockfunc_type* const *lcd_blockfuncs;
500 #else /* LCD_DEPTH == 1*/
501 extern lcd_pixelfunc_type* const lcd_pixelfuncs[8];
502 extern lcd_blockfunc_type* const lcd_blockfuncs[8];
503 #endif /* LCD_DEPTH */
505 extern void lcd_drawpixel(int x, int y);
506 extern void lcd_drawline(int x1, int y1, int x2, int y2);
507 extern void lcd_hline(int x1, int x2, int y);
508 extern void lcd_vline(int x, int y1, int y2);
509 extern void lcd_drawrect(int x, int y, int width, int height);
510 extern void lcd_fillrect(int x, int y, int width, int height);
511 extern void lcd_draw_border_viewport(void);
512 extern void lcd_fill_viewport(void);
513 extern void lcd_bitmap_part(const fb_data *src, int src_x, int src_y,
514 int stride, int x, int y, int width, int height);
515 extern void lcd_bitmap(const fb_data *src, int x, int y, int width,
516 int height);
518 extern void lcd_scroll_step(int pixels);
520 #if LCD_DEPTH > 1
521 extern void lcd_set_foreground(unsigned foreground);
522 extern unsigned lcd_get_foreground(void);
523 extern void lcd_set_background(unsigned background);
524 extern unsigned lcd_get_background(void);
525 #ifdef HAVE_LCD_COLOR
526 extern void lcd_set_selector_start(unsigned selector);
527 extern void lcd_set_selector_end(unsigned selector);
528 extern void lcd_set_selector_text(unsigned selector_text);
529 #endif
530 extern void lcd_set_drawinfo(int mode, unsigned foreground,
531 unsigned background);
532 void lcd_set_backdrop(fb_data* backdrop);
534 fb_data* lcd_get_backdrop(void);
536 extern void lcd_mono_bitmap_part(const unsigned char *src, int src_x, int src_y,
537 int stride, int x, int y, int width, int height);
538 extern void lcd_mono_bitmap(const unsigned char *src, int x, int y, int width,
539 int height);
540 extern void lcd_bitmap_transparent_part(const fb_data *src,
541 int src_x, int src_y,
542 int stride, int x, int y, int width,
543 int height);
544 extern void lcd_bitmap_transparent(const fb_data *src, int x, int y,
545 int width, int height);
546 #else /* LCD_DEPTH == 1 */
547 #define lcd_mono_bitmap lcd_bitmap
548 #define lcd_mono_bitmap_part lcd_bitmap_part
549 #endif /* LCD_DEPTH */
551 #endif /* HAVE_LCD_BITMAP */
554 #ifdef HAVE_TOUCHSCREEN
555 /* only needed for touchscreen for now, feel free to implement it for others
556 * once needed
559 #if defined(LCD_DPI) && (LCD_DPI > 0)
560 /* returns the pixel density of the display */
561 static inline int lcd_get_dpi(void) { return LCD_DPI; }
562 #else
563 extern int lcd_get_dpi(void);
564 #endif /* LCD_DPI */
565 #endif /* HAVE_TOUCHSCREEN */
567 #endif /* __LCD_H__ */