summaryrefslogtreecommitdiff
path: root/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
diff options
context:
space:
mode:
authorMaurus Cuelenaere <mcuelenaere@gmail.com>2010-01-03 15:57:09 +0000
committerMaurus Cuelenaere <mcuelenaere@gmail.com>2010-01-03 15:57:09 +0000
commit4fdf4ad728ac93336c850c7da8966e8d00bddbf8 (patch)
treef571a9f2f5049d7da50e614a51c968539b3d30e3 /firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
parent5313bf52b54c7a02222b1787f8432f43a76e0056 (diff)
downloadrockbox-4fdf4ad728ac93336c850c7da8966e8d00bddbf8.tar.gz
rockbox-4fdf4ad728ac93336c850c7da8966e8d00bddbf8.zip
Onda VX747/VX777: disable LCD when backlight is off (saves power)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24167 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c')
-rw-r--r--firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
index 99ffcf2981..7561d593db 100644
--- a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
@@ -49,20 +49,27 @@ void lcd_init_device(void)
49 system_enable_irq(DMA_IRQ(DMA_LCD_CHANNEL)); 49 system_enable_irq(DMA_IRQ(DMA_LCD_CHANNEL));
50} 50}
51 51
52#ifdef HAVE_LCD_ENABLE
52void lcd_enable(bool state) 53void lcd_enable(bool state)
53{ 54{
55 if(lcd_is_on == state)
56 return;
57
58 __cpm_start_lcd();
59
54 if(state) 60 if(state)
55 { 61 {
56 lcd_on(); 62 lcd_on();
57#ifdef HAVE_LCD_ENABLE
58 send_event(LCD_EVENT_ACTIVATION, NULL); 63 send_event(LCD_EVENT_ACTIVATION, NULL);
59#endif
60 } 64 }
61 else 65 else
62 lcd_off(); 66 lcd_off();
63 67
68 __cpm_stop_lcd();
69
64 lcd_is_on = state; 70 lcd_is_on = state;
65} 71}
72#endif
66 73
67bool lcd_active(void) 74bool lcd_active(void)
68{ 75{