summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-03-17 02:43:47 +0000
committerThomas Martitz <kugel@rockbox.org>2009-03-17 02:43:47 +0000
commitb7739fbf1c838cb6e6e47f9d28d5b339828e1e30 (patch)
treef4011d6a14cd93fae2002eeccdd63e039ab44f7e
parentaad712d39f3cdeb95a22e56edb805554dd0a90e1 (diff)
downloadrockbox-b7739fbf1c838cb6e6e47f9d28d5b339828e1e30.zip
rockbox-b7739fbf1c838cb6e6e47f9d28d5b339828e1e30.tar.gz
rockbox-b7739fbf1c838cb6e6e47f9d28d5b339828e1e30.tar.bz2
rockbox-b7739fbf1c838cb6e6e47f9d28d5b339828e1e30.tar.xz
Rework lcd_enabled and lcd_set/call_enable hook
a) lcd_enabled() is now lcd_active(), and is available for HAVE_LCD_SLEEP only targets (e.g. ipod video) too. It was depandent on HAVE_LCD_ENALE only before b) rename the hook accordingly, and implement the hook for other other targets too (e.g. the clip [the only mono target with lcd_enable/lcd_sleep yet, so the code is still in the lcd driver], ipod, fuze, c200) git-svn-id: svn://svn.rockbox.org/rockbox/trunk@20331 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugin.c4
-rw-r--r--apps/plugin.h4
-rw-r--r--apps/plugins/mpegplayer/mpeg_settings.c9
-rw-r--r--apps/plugins/mpegplayer/mpegplayer.c16
-rw-r--r--docs/PLUGIN_API.new4
-rw-r--r--firmware/drivers/lcd-16bit.c39
-rw-r--r--firmware/export/lcd.h18
-rw-r--r--firmware/scroll_engine.c8
-rw-r--r--firmware/target/arm/as3525/sansa-c200v2/lcd-c200v2.c4
-rw-r--r--firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c23
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c4
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c3
-rw-r--r--firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c4
-rw-r--r--firmware/target/arm/ipod/video/lcd-video.c5
-rw-r--r--firmware/target/arm/iriver/h10/lcd-h10_20gb.c4
-rw-r--r--firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c4
-rw-r--r--firmware/target/arm/sandisk/sansa-e200/lcd-e200.c4
-rw-r--r--firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c4
-rw-r--r--firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c4
-rw-r--r--firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c4
-rw-r--r--firmware/target/coldfire/iaudio/x5/lcd-x5.c4
-rw-r--r--firmware/target/coldfire/iriver/h300/lcd-h300.c4
-rw-r--r--firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c4
23 files changed, 99 insertions, 82 deletions
diff --git a/apps/plugin.c b/apps/plugin.c
index d72e439..ae32aca 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -138,8 +138,8 @@ static const struct plugin_api rockbox_api = {
#ifdef HAVE_LCD_INVERT
lcd_set_invert_display,
#endif /* HAVE_LCD_INVERT */
-#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
- lcd_set_enable_hook,
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+ lcd_activation_set_hook,
&button_queue,
#endif
bidi_l2v,
diff --git a/apps/plugin.h b/apps/plugin.h
index e4b13f5..cea09a7 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -223,8 +223,8 @@ struct plugin_api {
void (*lcd_set_invert_display)(bool yesno);
#endif /* HAVE_LCD_INVERT */
-#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
- void (*lcd_set_enable_hook)(void (*enable_hook)(void));
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+ void (*lcd_activation_set_hook)(void (*enable_hook)(void));
struct event_queue *button_queue;
#endif
unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation );
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c
index de667ec..3452903 100644
--- a/apps/plugins/mpegplayer/mpeg_settings.c
+++ b/apps/plugins/mpegplayer/mpeg_settings.c
@@ -604,7 +604,7 @@ static int get_start_time(uint32_t duration)
lcd_(update)();
#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
- rb->lcd_set_enable_hook(get_start_time_lcd_enable_hook);
+ rb->lcd_activation_set_hook(get_start_time_lcd_enable_hook);
#endif
draw_slider(0, 100, &rc_bound);
@@ -794,11 +794,10 @@ static int get_start_time(uint32_t duration)
rb->yield();
}
-#ifdef HAVE_LCD_COLOR
-#ifdef HAVE_LCD_ENABLE
- rb->lcd_set_enable_hook(NULL);
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+ rb->lcd_activation_set_hook(NULL);
#endif
-#else
+#ifndef HAVE_LCD_COLOR
stream_gray_show(false);
grey_clear_display();
grey_update();
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index eaf8f24..82ebfb1 100644
--- a/apps/plugins/mpegplayer/mpegplayer.c
+++ b/apps/plugins/mpegplayer/mpegplayer.c
@@ -621,7 +621,7 @@ static void draw_putsxy_oriented(int x, int y, const char *str)
}
#endif /* LCD_PORTRAIT */
-#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
/* So we can refresh the overlay */
static void wvs_lcd_enable_hook(void)
{
@@ -635,12 +635,12 @@ static void wvs_backlight_on_video_mode(bool video_on)
/* Turn off backlight timeout */
/* backlight control in lib/helper.c */
backlight_force_on();
-#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
- rb->lcd_set_enable_hook(NULL);
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+ rb->lcd_activation_set_hook(NULL);
#endif
} else {
-#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
- rb->lcd_set_enable_hook(wvs_lcd_enable_hook);
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+ rb->lcd_activation_set_hook(wvs_lcd_enable_hook);
#endif
/* Revert to user's backlight settings */
backlight_use_settings();
@@ -1485,7 +1485,7 @@ static void button_loop(void)
continue;
} /* BUTTON_NONE: */
-#ifdef HAVE_LCD_ENABLE
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
case LCD_ENABLE_EVENT_1:
{
/* Draw the current frame if prepared already */
@@ -1628,10 +1628,10 @@ static void button_loop(void)
wvs_stop();
-#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
/* Be sure hook is removed before exiting since the stop will put it
* back because of the backlight restore. */
- rb->lcd_set_enable_hook(NULL);
+ rb->lcd_activation_set_hook(NULL);
#endif
rb->lcd_setfont(FONT_UI);
diff --git a/docs/PLUGIN_API.new b/docs/PLUGIN_API.new
index b4790e3..c7fb655 100644
--- a/docs/PLUGIN_API.new
+++ b/docs/PLUGIN_API.new
@@ -1384,8 +1384,8 @@ void lcd_set_drawmode(int mode)
\param mode
\description
-void lcd_set_enable_hook(void (*enable_hook)(void))
- \conditions !defined(HAVE_LCD_CHARCELLS) && defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
+void lcd_activation_set_hook(void (*enable_hook)(void))
+ \conditions !defined(HAVE_LCD_CHARCELLS) && (defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP))
\param enable_hook
\description
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index c3e076b..0aa62f6 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -51,10 +51,6 @@ fb_data lcd_framebuffer[LCD_FBHEIGHT][LCD_FBWIDTH]
static fb_data* lcd_backdrop = NULL;
static long lcd_backdrop_offset IDATA_ATTR = 0;
-#ifdef HAVE_LCD_ENABLE
-static void (*lcd_enable_hook)(void) = NULL;
-#endif
-
static struct viewport default_vp =
{
.x = 0,
@@ -78,33 +74,36 @@ static struct viewport* current_vp IDATA_ATTR = &default_vp;
struct viewport* current_vp IDATA_ATTR = &default_vp;
#endif
-/* LCD init */
-void lcd_init(void)
-{
- lcd_clear_display();
-
- /* Call device specific init */
- lcd_init_device();
- scroll_init();
-}
/*** Helpers - consolidate optional code ***/
-#ifdef HAVE_LCD_ENABLE
-void lcd_set_enable_hook(void (*enable_hook)(void))
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+static void (*lcd_activation_hook)(void) = NULL;
+
+void lcd_activation_set_hook(void (*func)(void))
{
- lcd_enable_hook = enable_hook;
+ lcd_activation_hook = func;
}
/* To be called by target driver after enabling display and refreshing it */
-void lcd_call_enable_hook(void)
+void lcd_activation_call_hook(void)
{
- void (*enable_hook)(void) = lcd_enable_hook;
+ void (*func)(void) = lcd_activation_hook;
- if (enable_hook != NULL)
- enable_hook();
+ if (func != NULL)
+ func();
}
+
#endif
+/* LCD init */
+void lcd_init(void)
+{
+ lcd_clear_display();
+
+ /* Call device specific init */
+ lcd_init_device();
+ scroll_init();
+}
/*** Viewports ***/
void lcd_set_viewport(struct viewport* vp)
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index e435d17..e34fac5 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -341,21 +341,21 @@ void lcd_poweroff(void);
#ifdef HAVE_LCD_ENABLE
/* Enable/disable the main display. */
extern void lcd_enable(bool on);
-extern bool lcd_enabled(void);
-
-#ifdef HAVE_LCD_COLOR
-/* Register a hook that is called when the lcd is powered and after the
- * framebuffer data is synchronized */
-void lcd_set_enable_hook(void (*enable_hook)(void));
-#endif /* HAVE_LCD_COLOR */
-
#endif /* HAVE_LCD_ENABLE */
-void lcd_call_enable_hook(void);
#ifdef HAVE_LCD_SLEEP
/* Put the LCD into a power saving state deeper than lcd_enable(false). */
extern void lcd_sleep(void);
#endif /* HAVE_LCD_SLEEP */
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+/* Register a hook that is called when the lcd is powered and after the
+ * framebuffer data is synchronized */
+/* Sansa Clip has these function in it's lcd driver, since it's the only
+ * 1-bit display featuring lcd_active, so far */
+extern bool lcd_active(void);
+extern void lcd_activation_set_hook(void (*enable_hook)(void));
+extern void lcd_activation_call_hook(void);
+#endif
#ifdef HAVE_LCD_SHUTDOWN
void lcd_shutdown(void);
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 6c7f7e6..8d84c79 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -305,8 +305,8 @@ static void scroll_thread(void)
if (scroll & SCROLL_LCD)
{
-#ifdef HAVE_LCD_ENABLE
- if (lcd_enabled())
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+ if (lcd_active())
#endif
lcd_scroll_fn();
lcd_scroll_info.last_scroll = current_tick;
@@ -328,8 +328,8 @@ static void scroll_thread(void)
while (1)
{
sleep(lcd_scroll_info.ticks);
-#ifdef HAVE_LCD_ENABLE
- if (lcd_enabled())
+#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
+ if (lcd_active())
#endif
lcd_scroll_fn();
}
diff --git a/firmware/target/arm/as3525/sansa-c200v2/lcd-c200v2.c b/firmware/target/arm/as3525/sansa-c200v2/lcd-c200v2.c
index 2fc3e1f..88adcd9 100644
--- a/firmware/target/arm/as3525/sansa-c200v2/lcd-c200v2.c
+++ b/firmware/target/arm/as3525/sansa-c200v2/lcd-c200v2.c
@@ -322,7 +322,7 @@ void lcd_enable(bool on)
if(on)
{
_display_on();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -332,7 +332,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c b/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c
index bfa02e7..640f669 100644
--- a/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c
+++ b/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c
@@ -159,22 +159,43 @@ void lcd_set_flip(bool yesno)
}
}
+#ifdef HAVE_LCD_ENABLE
+static void (*lcd_activation_hook)(void) = NULL;
+
+void lcd_activation_set_hook(void (*func)(void))
+{
+ lcd_activation_hook = func;
+}
+
+void lcd_activation_call_hook(void)
+{
+ void (*func)(void) = lcd_activation_hook;
+
+ if (func != NULL)
+ func();
+}
+
+
void lcd_enable(bool enable)
{
if(display_on == enable)
return;
if( (display_on = enable) ) /* simple '=' is not a typo ! */
+ {
lcd_write_command(LCD_SET_DISPLAY_ON);
+ lcd_activation_call_hook();
+ }
else
lcd_write_command(LCD_SET_DISPLAY_OFF);
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
+#endif
/* LCD init, largely based on what OF does */
void lcd_init_device(void)
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index 57d5649..8715622 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -328,7 +328,7 @@ void lcd_enable(bool on)
if(on)
{
_display_on();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -338,7 +338,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
index 4445113..5196784 100644
--- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
+++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
@@ -206,6 +206,7 @@ void lcd_enable(bool on)
/* a bit of delay before returning to
* avoid irritating flash on backlight on */
while(delay--);
+ lcd_activation_call_hook();
}
else
@@ -217,7 +218,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c
index 47834b3..bddf03c 100644
--- a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c
+++ b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c
@@ -121,7 +121,7 @@ void lcd_enable(bool state)
lcd_powered = true;
lcd_on = true;
lcd_update();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -129,7 +129,7 @@ void lcd_enable(bool state)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return lcd_on;
}
diff --git a/firmware/target/arm/ipod/video/lcd-video.c b/firmware/target/arm/ipod/video/lcd-video.c
index d1701ea..c0e98cf5 100644
--- a/firmware/target/arm/ipod/video/lcd-video.c
+++ b/firmware/target/arm/ipod/video/lcd-video.c
@@ -575,10 +575,7 @@ void lcd_awake(void)
lcd_state.state = LCD_INITIAL;
tick_add_task(&lcd_tick);
lcd_state.display_on = true;
- /* Note that only the RGB data from lcd_framebuffer has been
- displayed. If YUV data was displayed, it needs to be updated
- now. (eg. see lcd_call_enable_hook())
- */
+ lcd_activation_call_hook();
}
mutex_unlock(&lcdstate_lock);
}
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
index ffd8ab6..03a398a 100644
--- a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
+++ b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
@@ -363,7 +363,7 @@ void lcd_enable(bool on)
/* Probably out of sync and we don't wanna pepper the code with
lcd_update() calls for this. */
lcd_update();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -371,7 +371,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
index d9a28d1..fd52eda 100644
--- a/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
+++ b/firmware/target/arm/s3c2440/gigabeat-fx/lcd-meg-fx.c
@@ -42,7 +42,7 @@ extern struct viewport* current_vp;
extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src,
int width, int height);
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return lcd_on;
}
@@ -308,7 +308,7 @@ void lcd_enable(bool state)
lcd_on = true;
lcd_update();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
index e477f4f..e1a4d73 100644
--- a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
+++ b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
@@ -438,7 +438,7 @@ void lcd_enable(bool on)
DEV_EN |= DEV_LCD; /* Enable LCD controller */
lcd_display_on(); /* Turn on display */
lcd_update(); /* Resync display */
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
LCD_REG_6 |= 1; /* Restart DMA */
sleep(HZ/50); /* Wait for a frame to be written */
}
@@ -451,7 +451,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c b/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c
index 0ca18be..134d936 100644
--- a/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c
+++ b/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c
@@ -143,7 +143,7 @@ void lcd_enable(bool on)
if (on) {
_display_on();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
} else {
/** Off sequence according to datasheet, p. 130 **/
lcd_write_reg(R_FRAME_CYCLE_CONTROL, 0x0002); /* EQ=0, 18 clks/line */
@@ -166,7 +166,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
index d6ee5f3..7b64493 100644
--- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
+++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
@@ -230,7 +230,7 @@ void lcd_enable(bool on)
lcd_display_on();
LCDC_CTRL |= 1; /* controller enable */
lcd_update(); /* Resync display */
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -239,7 +239,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c
index f34e436..cd07fa9 100644
--- a/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c
+++ b/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c
@@ -237,7 +237,7 @@ return;
{
lcd_display_on(false); /* Turn on display */
lcd_update(); /* Resync display */
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -245,7 +245,7 @@ return;
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
index fca39e6..4737f31 100644
--- a/firmware/target/coldfire/iaudio/x5/lcd-x5.c
+++ b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
@@ -385,7 +385,7 @@ void lcd_enable(bool on)
/* Probably out of sync and we don't wanna pepper the code with
lcd_update() calls for this. */
lcd_update();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -393,7 +393,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/coldfire/iriver/h300/lcd-h300.c b/firmware/target/coldfire/iriver/h300/lcd-h300.c
index 3c70e5b..867bc5a 100644
--- a/firmware/target/coldfire/iriver/h300/lcd-h300.c
+++ b/firmware/target/coldfire/iriver/h300/lcd-h300.c
@@ -263,7 +263,7 @@ void lcd_enable(bool on)
if(on)
{
_display_on();
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
}
else
{
@@ -290,7 +290,7 @@ void lcd_enable(bool on)
}
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return display_on;
}
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
index d9eb3ec..783621c 100644
--- a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
+++ b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
@@ -54,7 +54,7 @@ void lcd_enable(bool state)
{
lcd_on();
#ifdef HAVE_LCD_ENABLE
- lcd_call_enable_hook();
+ lcd_activation_call_hook();
#endif
}
else
@@ -63,7 +63,7 @@ void lcd_enable(bool state)
lcd_is_on = state;
}
-bool lcd_enabled(void)
+bool lcd_active(void)
{
return lcd_is_on;
}