From a4e7bc383ed296b532a648a02db62a06c99c9ad8 Mon Sep 17 00:00:00 2001 From: Maurus Cuelenaere Date: Tue, 27 Jan 2009 00:38:58 +0000 Subject: Onda VX747: * Implement lcd_flip() * Add support for multiple banks in NAND driver * Add basic I²C driver (untested) * Get audio back working * Add power driver * Other minor fixes and cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19863 a1c6a512-1295-4272-9138-f99709370657 --- .../ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) (limited to 'firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c') diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c b/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c index faed5ecda2..c07a191bbe 100644 --- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c +++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c @@ -240,6 +240,34 @@ void lcd_set_target(short x, short y, short width, short height) SLCD_SET_COMMAND(REG_RW_GRAM); /* write data to GRAM */ } +void lcd_set_flip(bool yesno) +{ + int i; + + __cpm_start_lcd(); +#if CONFIG_ORIENTATION == SCREEN_PORTRAIT + if(yesno) + { + SLCD_SEND_COMMAND(REG_ENTRY_MODE, (ENTRY_MODE_BGR | ENTRY_MODE_HWM)); + } + else + { + SLCD_SEND_COMMAND(REG_ENTRY_MODE, (ENTRY_MODE_BGR | ENTRY_MODE_VID | ENTRY_MODE_HID | ENTRY_MODE_HWM)); + } +#else + if(yesno) + { + SLCD_SEND_COMMAND(REG_ENTRY_MODE, (ENTRY_MODE_BGR | ENTRY_MODE_HID | ENTRY_MODE_AM)); + } + else + { + SLCD_SEND_COMMAND(REG_ENTRY_MODE, (ENTRY_MODE_BGR | ENTRY_MODE_VID | ENTRY_MODE_AM)); + } +#endif + DELAY; + __cpm_stop_lcd(); +} + void lcd_on(void) { _display_on(); -- cgit v1.2.3