summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_jz47xx
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-10 19:59:52 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2008-09-10 19:59:52 +0000
commit1cf8331d7a4e5fc7b0548688ff5d018224cc4ed1 (patch)
tree32f5029a09835096ed0e993d7a905ccc72cee1bc /firmware/target/mips/ingenic_jz47xx
parent5aa914f1793778ed36057a1a76769a5cd8f019ff (diff)
Hopefully fix LCD problems
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18485 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-ondavx767.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-ondavx767.c b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-ondavx767.c
index 63d1736ebe..056c068f23 100644
--- a/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-ondavx767.c
+++ b/firmware/target/mips/ingenic_jz47xx/onda_vx767/lcd-ondavx767.c
@@ -59,9 +59,17 @@ static void _display_pin_init(void)
}
#define WAIT_ON_SLCD while(REG_SLCD_STATE & SLCD_STATE_BUSY);
-#define SLCD_SET_DATA(x) WAIT_ON_SLCD; REG_SLCD_DATA = (x) | SLCD_DATA_RS_DATA;
-#define SLCD_SET_COMMAND(x) WAIT_ON_SLCD; REG_SLCD_DATA = (x) | SLCD_DATA_RS_COMMAND;
-#define SLCD_SEND_COMMAND(cmd,val) SLCD_SET_COMMAND(cmd); __gpio_set_pin(PIN_UNK_N); SLCD_SET_DATA(val); __gpio_clear_pin(PIN_UNK_N);
+#define SLCD_SET_DATA(x) REG_SLCD_DATA = (x) | SLCD_DATA_RS_DATA;
+#define SLCD_SET_COMMAND(x) REG_SLCD_DATA = (x) | SLCD_DATA_RS_COMMAND;
+
+#define SLCD_SEND_COMMAND(cmd,val) \
+ __gpio_clear_pin(PIN_UNK_N); \
+ SLCD_SET_COMMAND(cmd); \
+ WAIT_ON_SLCD; \
+ __gpio_set_pin(PIN_UNK_N); \
+ SLCD_SET_DATA(val); \
+ WAIT_ON_SLCD;
+
static void _display_init(void)
{
int i;
@@ -125,7 +133,9 @@ static void _display_init(void)
SLCD_SEND_COMMAND(0x98, 0);
SLCD_SEND_COMMAND(0x7, 0x173);
+ __gpio_clear_pin(PIN_UNK_N);
SLCD_SET_COMMAND(0x22);
+ WAIT_ON_SLCD;
__gpio_set_pin(PIN_UNK_N);
}