summaryrefslogtreecommitdiffstats
path: root/firmware/export/lcd-remote.h
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2007-02-20 19:31:34 +0000
committerJens Arnold <amiconn@rockbox.org>2007-02-20 19:31:34 +0000
commit51223e53957943c8b4c142882d2aa86d8025837d (patch)
tree6348e4c292a2e38f501b6ae3676f76ef26ff21e0 /firmware/export/lcd-remote.h
parent283bfb16f1228f581e8a025bba5e2029daa32278 (diff)
downloadrockbox-51223e53957943c8b4c142882d2aa86d8025837d.tar.gz
rockbox-51223e53957943c8b4c142882d2aa86d8025837d.tar.bz2
rockbox-51223e53957943c8b4c142882d2aa86d8025837d.zip
Introduced LCD_FBHEIGHT in addition to the already existing LCD_FBWIDTH to ease framebuffer handling a bit. Added equivalent definitions for the remote LCD.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@12419 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/export/lcd-remote.h')
-rw-r--r--firmware/export/lcd-remote.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/firmware/export/lcd-remote.h b/firmware/export/lcd-remote.h
index e4fffedac0..7ed52bd188 100644
--- a/firmware/export/lcd-remote.h
+++ b/firmware/export/lcd-remote.h
@@ -82,14 +82,25 @@ extern unsigned lcd_remote_color_to_native(unsigned color);
#define LCD_REMOTE_DEFAULT_BG LCD_REMOTE_WHITE
#endif
-/* Memory copy of display bitmap */
+/* Frame buffer dimensions (format checks only cover existing targets!) */
#if LCD_REMOTE_DEPTH == 1
-extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH];
+#define LCD_REMOTE_FBHEIGHT ((LCD_REMOTE_HEIGHT+7)/8)
#elif LCD_REMOTE_DEPTH == 2
#if LCD_REMOTE_PIXELFORMAT == VERTICAL_INTERLEAVED
-extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_HEIGHT/8][LCD_REMOTE_WIDTH];
+#define LCD_REMOTE_FBHEIGHT ((LCD_REMOTE_HEIGHT+7)/8)
#endif
+#endif /* LCD_REMOTE_DEPTH */
+/* Set defaults if not defined different yet. The defaults apply to both
+ * dimensions for LCD_REMOTE_DEPTH >= 8 */
+#ifndef LCD_REMOTE_FBWIDTH
+#define LCD_REMOTE_FBWIDTH LCD_REMOTE_WIDTH
#endif
+#ifndef LCD_REMOTE_FBHEIGHT
+#define LCD_REMOTE_FBHEIGHT LCD_REMOTE_HEIGHT
+#endif
+/* The actual framebuffer */
+extern fb_remote_data lcd_remote_framebuffer[LCD_REMOTE_FBHEIGHT][LCD_REMOTE_FBWIDTH];
+
extern void lcd_remote_init(void);
extern int lcd_remote_default_contrast(void);