summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-16 12:54:43 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-07-16 12:54:43 +0000
commite3b2f4ffeda7b804a16125e26918c7cdbcecdac9 (patch)
treefb4bb916ced47e43c942478fca66495d3b803238
parentffddab1e664ee9c0a1aec69f02a8ebfaeba3fb3e (diff)
downloadrockbox-e3b2f4ffeda7b804a16125e26918c7cdbcecdac9.tar.gz
rockbox-e3b2f4ffeda7b804a16125e26918c7cdbcecdac9.zip
Switch screen 90 degrees clockwise
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18069 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/export/config-ondavx747.h7
-rw-r--r--firmware/export/r61509.h13
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx747/button-onda_vx747.c9
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c6
4 files changed, 20 insertions, 15 deletions
diff --git a/firmware/export/config-ondavx747.h b/firmware/export/config-ondavx747.h
index 96057710c0..1c2be01d93 100644
--- a/firmware/export/config-ondavx747.h
+++ b/firmware/export/config-ondavx747.h
@@ -55,11 +55,8 @@
/* LCD dimensions */
#define CONFIG_LCD LCD_ONDAVX747
-/* choose the lcd orientation. both work */
-#define CONFIG_ORIENTATION SCREEN_PORTRAIT
-
-#define LCD_WIDTH 400
-#define LCD_HEIGHT 240
+#define LCD_WIDTH 240
+#define LCD_HEIGHT 400
#define LCD_DEPTH 16 /* 16bit colours */
#define LCD_PIXELFORMAT RGB565 /* rgb565 */
diff --git a/firmware/export/r61509.h b/firmware/export/r61509.h
index ca966ee781..8ca3b6d00b 100644
--- a/firmware/export/r61509.h
+++ b/firmware/export/r61509.h
@@ -96,8 +96,17 @@
#define DRIVER_OUTPUT_SS_BIT (1 << 8)
#define DRIVER_OUTPUT_SM_BIT (1 << 10)
-#define SOFT_RESET_EN (1 << 0)
-#define SOFT_RESET_DIS (0 << 0)
+#define ENTRY_MODE_TRI (1 << 15)
+#define ENTRY_MODE_DFM (1 << 14)
+#define ENTRY_MODE_BGR (1 << 12)
+#define ENTRY_MODE_HWM (1 << 9)
+#define ENTRY_MODE_ORG (1 << 7)
+#define ENTRY_MODE_VID (1 << 5)
+#define ENTRY_MODE_HID (1 << 4)
+#define ENTRY_MODE_AM (1 << 3)
+#define ENTRY_MODE_EPF(n) (n & 3)
+
+#define SOFT_RESET(n) (n << 0)
#define ENDIAN_CTRL_BIG
#define ENDIAN_CTRL_LITTLE
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-onda_vx747.c b/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-onda_vx747.c
index 950fc51d69..b3c0a5fb64 100644
--- a/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-onda_vx747.c
+++ b/firmware/target/mips/ingenic_jz47xx/onda_vx747/button-onda_vx747.c
@@ -67,13 +67,12 @@ static int touch_to_pixels(short x, short y)
y -= 300;
/* X & Y are switched */
- x /= 3200 / LCD_HEIGHT;
- y /= 3600 / LCD_WIDTH;
+ x /= 3200 / LCD_WIDTH;
+ y /= 3600 / LCD_HEIGHT;
- x = LCD_HEIGHT - x;
- y = LCD_WIDTH - y;
+ y = LCD_HEIGHT - y;
- return (y << 16) | x;
+ return (x << 16) | y;
}
int button_read_device(int *data)
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 05e4d3a9fc..871f2f0861 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
@@ -61,15 +61,15 @@ static void _display_on(void)
{
int i;
- SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET_EN);
+ SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET(1));
SLEEP(700000);
- SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET_DIS);
+ SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET(0));
SLEEP(700000);
SLCD_SEND_COMMAND(REG_ENDIAN_CTRL, 0);
SLCD_SEND_COMMAND(REG_DRIVER_OUTPUT, 0x100);
SLCD_SEND_COMMAND(REG_LCD_DR_WAVE_CTRL, 0x100);
- SLCD_SEND_COMMAND(REG_ENTRY_MODE, 0x1028);
+ SLCD_SEND_COMMAND(REG_ENTRY_MODE, (ENTRY_MODE_BGR | ENTRY_MODE_VID | ENTRY_MODE_HID));
SLCD_SEND_COMMAND(REG_DISP_CTRL2, 0x503);
SLCD_SEND_COMMAND(REG_DISP_CTRL3, 1);
SLCD_SEND_COMMAND(REG_LPCTRL, 0x10);