summaryrefslogtreecommitdiffstats
path: root/firmware/target/mips/ingenic_jz47xx/onda_vx767
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-08 08:59:37 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2009-06-08 08:59:37 +0000
commit99c854e30a3988c75c5114326c4fb9aa8d8176ea (patch)
tree6e4bf19da580c868eb8a1b500efceb48ac82e658 /firmware/target/mips/ingenic_jz47xx/onda_vx767
parent6eebabfe44bdc14f2f74db8cdffebb5a27fae186 (diff)
downloadrockbox-99c854e30a3988c75c5114326c4fb9aa8d8176ea.tar.gz
rockbox-99c854e30a3988c75c5114326c4fb9aa8d8176ea.tar.bz2
rockbox-99c854e30a3988c75c5114326c4fb9aa8d8176ea.zip
VX767: cleanup LCD driver a bit + add forgotten backlight-target.h
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21214 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/onda_vx767')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h31
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c12
2 files changed, 36 insertions, 7 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h b/firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h
new file mode 100644
index 0000000000..67836aa790
--- /dev/null
+++ b/firmware/target/mips/ingenic_jz47xx/onda_vx767/backlight-target.h
@@ -0,0 +1,31 @@
+/***************************************************************************
+ * __________ __ ___.
+ * Open \______ \ ____ ____ | | _\_ |__ _______ ___
+ * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
+ * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
+ * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
+ * \/ \/ \/ \/ \/
+ * $Id$
+ *
+ * Copyright (C) 2008 by Maurus Cuelenaere
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
+ * KIND, either express or implied.
+ *
+ ****************************************************************************/
+#ifndef BACKLIGHT_TARGET_H
+#define BACKLIGHT_TARGET_H
+
+#include <stdbool.h>
+
+bool _backlight_init(void);
+void _backlight_on(void);
+void _backlight_off(void);
+void _backlight_set_brightness(int brightness);
+
+#endif /* BACKLIGHT_TARGET_H */
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c
index 691e5c4b16..a91e041184 100644
--- a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c
+++ b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-onda_vx767.c
@@ -30,10 +30,10 @@
#define LCD_PCLK (20000000) /* LCD PCLK */
#define my__gpio_as_lcd_16bit() \
-do { \
- REG_GPIO_PXFUNS(2) = 0x0014ffff; \
- REG_GPIO_PXSELC(2) = 0x0014ffff; \
- REG_GPIO_PXPES(2) = 0x0014ffff; \
+do { \
+ REG_GPIO_PXFUNS(2) = 0x0014ffff; \
+ REG_GPIO_PXSELC(2) = 0x0014ffff; \
+ REG_GPIO_PXPES(2) = 0x0014ffff; \
} while (0)
@@ -53,7 +53,7 @@ static void _display_pin_init(void)
DELAY; /* delay_ms(10); */
__gpio_set_pin(PIN_RESET_N);
- DELAY; /* delay_ms(10); */
+ DELAY; /* delay_ms(10); */
__gpio_clear_pin(PIN_RESET_N);
DELAY; /* delay_ms(10); */
__gpio_set_pin(PIN_RESET_N);
@@ -157,8 +157,6 @@ static void _set_lcd_bus(void)
REG_SLCD_CFG = (SLCD_CFG_BURST_4_WORD | SLCD_CFG_DWIDTH_18 | SLCD_CFG_CWIDTH_18BIT
| SLCD_CFG_CS_ACTIVE_LOW | SLCD_CFG_RS_CMD_LOW | SLCD_CFG_CLK_ACTIVE_FALLING
| SLCD_CFG_TYPE_PARALLEL);
-
- REG_SLCD_CTRL = SLCD_CTRL_DMA_EN;
}
static void _set_lcd_clock(void)