diff options
author | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-09-09 06:12:40 +0000 |
---|---|---|
committer | Jörg Hohensohn <hohensoh@rockbox.org> | 2004-09-09 06:12:40 +0000 |
commit | d5c293a525e364f17b3cc9ec8eeb00c000796bc9 (patch) | |
tree | e7601d39c99efe2e79def90f739c287d67bbec2b /firmware/drivers/lcd-recorder.c | |
parent | 218d90b307f874570f97be9a79943c4acc582b18 (diff) |
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
Diffstat (limited to 'firmware/drivers/lcd-recorder.c')
-rw-r--r-- | firmware/drivers/lcd-recorder.c | 9 |
1 files changed, 6 insertions, 3 deletions
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); |