diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/onda_vx747/button-onda_vx747.c | 9 | ||||
-rw-r--r-- | firmware/target/mips/ingenic_jz47xx/onda_vx747/lcd-onda_vx747.c | 6 |
2 files changed, 7 insertions, 8 deletions
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) | |||
67 | y -= 300; | 67 | y -= 300; |
68 | 68 | ||
69 | /* X & Y are switched */ | 69 | /* X & Y are switched */ |
70 | x /= 3200 / LCD_HEIGHT; | 70 | x /= 3200 / LCD_WIDTH; |
71 | y /= 3600 / LCD_WIDTH; | 71 | y /= 3600 / LCD_HEIGHT; |
72 | 72 | ||
73 | x = LCD_HEIGHT - x; | 73 | y = LCD_HEIGHT - y; |
74 | y = LCD_WIDTH - y; | ||
75 | 74 | ||
76 | return (y << 16) | x; | 75 | return (x << 16) | y; |
77 | } | 76 | } |
78 | 77 | ||
79 | int button_read_device(int *data) | 78 | 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) | |||
61 | { | 61 | { |
62 | int i; | 62 | int i; |
63 | 63 | ||
64 | SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET_EN); | 64 | SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET(1)); |
65 | SLEEP(700000); | 65 | SLEEP(700000); |
66 | SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET_DIS); | 66 | SLCD_SEND_COMMAND(REG_SOFT_RESET, SOFT_RESET(0)); |
67 | SLEEP(700000); | 67 | SLEEP(700000); |
68 | SLCD_SEND_COMMAND(REG_ENDIAN_CTRL, 0); | 68 | SLCD_SEND_COMMAND(REG_ENDIAN_CTRL, 0); |
69 | 69 | ||
70 | SLCD_SEND_COMMAND(REG_DRIVER_OUTPUT, 0x100); | 70 | SLCD_SEND_COMMAND(REG_DRIVER_OUTPUT, 0x100); |
71 | SLCD_SEND_COMMAND(REG_LCD_DR_WAVE_CTRL, 0x100); | 71 | SLCD_SEND_COMMAND(REG_LCD_DR_WAVE_CTRL, 0x100); |
72 | SLCD_SEND_COMMAND(REG_ENTRY_MODE, 0x1028); | 72 | SLCD_SEND_COMMAND(REG_ENTRY_MODE, (ENTRY_MODE_BGR | ENTRY_MODE_VID | ENTRY_MODE_HID)); |
73 | SLCD_SEND_COMMAND(REG_DISP_CTRL2, 0x503); | 73 | SLCD_SEND_COMMAND(REG_DISP_CTRL2, 0x503); |
74 | SLCD_SEND_COMMAND(REG_DISP_CTRL3, 1); | 74 | SLCD_SEND_COMMAND(REG_DISP_CTRL3, 1); |
75 | SLCD_SEND_COMMAND(REG_LPCTRL, 0x10); | 75 | SLCD_SEND_COMMAND(REG_LPCTRL, 0x10); |