From d5c293a525e364f17b3cc9ec8eeb00c000796bc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Hohensohn?= Date: Thu, 9 Sep 2004 06:12:40 +0000 Subject: the very first adjustment for the Ondio: fix the screen orientation git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5053 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/lcd-recorder.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'firmware/drivers/lcd-recorder.c') diff --git a/firmware/drivers/lcd-recorder.c b/firmware/drivers/lcd-recorder.c index d2b0c4e6b1..a711a8fa6d 100644 --- a/firmware/drivers/lcd-recorder.c +++ b/firmware/drivers/lcd-recorder.c @@ -103,7 +103,7 @@ static int xmargin = 0; static int ymargin = 0; static int curfont = FONT_SYSFIXED; #ifndef SIMULATOR -static int xoffset = 0; /* needed for flip */ +static int xoffset; /* needed for flip */ #endif unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH]; @@ -148,8 +148,7 @@ void lcd_init (void) lcd_write_command(LCD_SET_POWER_CONTROL_REGISTER + 7); /* power control register: op-amp=1, regulator=1, booster=1 */ lcd_write_command(LCD_SET_DISPLAY_ON); lcd_write_command(LCD_SET_NORMAL_DISPLAY); - lcd_write_command(LCD_SET_SEGMENT_REMAP + 1); /* mirror horizontal: 1 */ - lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION + 8); /* mirror vertical: 1 */ + lcd_set_flip(false); lcd_write_command(LCD_SET_DISPLAY_START_LINE + 0); lcd_set_contrast(lcd_default_contrast()); lcd_write_command(LCD_SET_PAGE_ADDRESS); @@ -249,7 +248,11 @@ void lcd_set_invert_display(bool yesno) /* turn the display upside down (call lcd_update() afterwards) */ void lcd_set_flip(bool yesno) { +#ifdef HAVE_DISPLAY_FLIPPED + if (!yesno) +#else if (yesno) +#endif { lcd_write_command(LCD_SET_SEGMENT_REMAP); lcd_write_command(LCD_SET_COM_OUTPUT_SCAN_DIRECTION); -- cgit v1.2.3