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.tar.gz
rockbox-b7739fbf1c838cb6e6e47f9d28d5b339828e1e30.zip
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 d72e439bec..ae32aca2c5 100644
--- a/apps/plugin.c
+++ b/apps/plugin.c
@@ -138,8 +138,8 @@ static const struct plugin_api rockbox_api = {
138#ifdef HAVE_LCD_INVERT 138#ifdef HAVE_LCD_INVERT
139 lcd_set_invert_display, 139 lcd_set_invert_display,
140#endif /* HAVE_LCD_INVERT */ 140#endif /* HAVE_LCD_INVERT */
141#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 141#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
142 lcd_set_enable_hook, 142 lcd_activation_set_hook,
143 &button_queue, 143 &button_queue,
144#endif 144#endif
145 bidi_l2v, 145 bidi_l2v,
diff --git a/apps/plugin.h b/apps/plugin.h
index e4b13f5770..cea09a7246 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -223,8 +223,8 @@ struct plugin_api {
223 void (*lcd_set_invert_display)(bool yesno); 223 void (*lcd_set_invert_display)(bool yesno);
224#endif /* HAVE_LCD_INVERT */ 224#endif /* HAVE_LCD_INVERT */
225 225
226#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 226#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
227 void (*lcd_set_enable_hook)(void (*enable_hook)(void)); 227 void (*lcd_activation_set_hook)(void (*enable_hook)(void));
228 struct event_queue *button_queue; 228 struct event_queue *button_queue;
229#endif 229#endif
230 unsigned short *(*bidi_l2v)( const unsigned char *str, int orientation ); 230 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 de667ec782..3452903b47 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)
604 lcd_(update)(); 604 lcd_(update)();
605 605
606#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 606#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR)
607 rb->lcd_set_enable_hook(get_start_time_lcd_enable_hook); 607 rb->lcd_activation_set_hook(get_start_time_lcd_enable_hook);
608#endif 608#endif
609 609
610 draw_slider(0, 100, &rc_bound); 610 draw_slider(0, 100, &rc_bound);
@@ -794,11 +794,10 @@ static int get_start_time(uint32_t duration)
794 rb->yield(); 794 rb->yield();
795 } 795 }
796 796
797#ifdef HAVE_LCD_COLOR 797#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
798#ifdef HAVE_LCD_ENABLE 798 rb->lcd_activation_set_hook(NULL);
799 rb->lcd_set_enable_hook(NULL);
800#endif 799#endif
801#else 800#ifndef HAVE_LCD_COLOR
802 stream_gray_show(false); 801 stream_gray_show(false);
803 grey_clear_display(); 802 grey_clear_display();
804 grey_update(); 803 grey_update();
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c
index eaf8f246c6..82ebfb1111 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)
621} 621}
622#endif /* LCD_PORTRAIT */ 622#endif /* LCD_PORTRAIT */
623 623
624#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 624#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
625/* So we can refresh the overlay */ 625/* So we can refresh the overlay */
626static void wvs_lcd_enable_hook(void) 626static void wvs_lcd_enable_hook(void)
627{ 627{
@@ -635,12 +635,12 @@ static void wvs_backlight_on_video_mode(bool video_on)
635 /* Turn off backlight timeout */ 635 /* Turn off backlight timeout */
636 /* backlight control in lib/helper.c */ 636 /* backlight control in lib/helper.c */
637 backlight_force_on(); 637 backlight_force_on();
638#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 638#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
639 rb->lcd_set_enable_hook(NULL); 639 rb->lcd_activation_set_hook(NULL);
640#endif 640#endif
641 } else { 641 } else {
642#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 642#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
643 rb->lcd_set_enable_hook(wvs_lcd_enable_hook); 643 rb->lcd_activation_set_hook(wvs_lcd_enable_hook);
644#endif 644#endif
645 /* Revert to user's backlight settings */ 645 /* Revert to user's backlight settings */
646 backlight_use_settings(); 646 backlight_use_settings();
@@ -1485,7 +1485,7 @@ static void button_loop(void)
1485 continue; 1485 continue;
1486 } /* BUTTON_NONE: */ 1486 } /* BUTTON_NONE: */
1487 1487
1488#ifdef HAVE_LCD_ENABLE 1488#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
1489 case LCD_ENABLE_EVENT_1: 1489 case LCD_ENABLE_EVENT_1:
1490 { 1490 {
1491 /* Draw the current frame if prepared already */ 1491 /* Draw the current frame if prepared already */
@@ -1628,10 +1628,10 @@ static void button_loop(void)
1628 1628
1629 wvs_stop(); 1629 wvs_stop();
1630 1630
1631#if defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 1631#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
1632 /* Be sure hook is removed before exiting since the stop will put it 1632 /* Be sure hook is removed before exiting since the stop will put it
1633 * back because of the backlight restore. */ 1633 * back because of the backlight restore. */
1634 rb->lcd_set_enable_hook(NULL); 1634 rb->lcd_activation_set_hook(NULL);
1635#endif 1635#endif
1636 1636
1637 rb->lcd_setfont(FONT_UI); 1637 rb->lcd_setfont(FONT_UI);
diff --git a/docs/PLUGIN_API.new b/docs/PLUGIN_API.new
index b4790e3ea6..c7fb6551f1 100644
--- a/docs/PLUGIN_API.new
+++ b/docs/PLUGIN_API.new
@@ -1384,8 +1384,8 @@ void lcd_set_drawmode(int mode)
1384 \param mode 1384 \param mode
1385 \description 1385 \description
1386 1386
1387void lcd_set_enable_hook(void (*enable_hook)(void)) 1387void lcd_activation_set_hook(void (*enable_hook)(void))
1388 \conditions !defined(HAVE_LCD_CHARCELLS) && defined(HAVE_LCD_ENABLE) && defined(HAVE_LCD_COLOR) 1388 \conditions !defined(HAVE_LCD_CHARCELLS) && (defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP))
1389 \param enable_hook 1389 \param enable_hook
1390 \description 1390 \description
1391 1391
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index c3e076b392..0aa62f66b4 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]
51static fb_data* lcd_backdrop = NULL; 51static fb_data* lcd_backdrop = NULL;
52static long lcd_backdrop_offset IDATA_ATTR = 0; 52static long lcd_backdrop_offset IDATA_ATTR = 0;
53 53
54#ifdef HAVE_LCD_ENABLE
55static void (*lcd_enable_hook)(void) = NULL;
56#endif
57
58static struct viewport default_vp = 54static struct viewport default_vp =
59{ 55{
60 .x = 0, 56 .x = 0,
@@ -78,33 +74,36 @@ static struct viewport* current_vp IDATA_ATTR = &default_vp;
78struct viewport* current_vp IDATA_ATTR = &default_vp; 74struct viewport* current_vp IDATA_ATTR = &default_vp;
79#endif 75#endif
80 76
81/* LCD init */
82void lcd_init(void)
83{
84 lcd_clear_display();
85
86 /* Call device specific init */
87 lcd_init_device();
88 scroll_init();
89}
90 77
91/*** Helpers - consolidate optional code ***/ 78/*** Helpers - consolidate optional code ***/
92#ifdef HAVE_LCD_ENABLE 79#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
93void lcd_set_enable_hook(void (*enable_hook)(void)) 80static void (*lcd_activation_hook)(void) = NULL;
81
82void lcd_activation_set_hook(void (*func)(void))
94{ 83{
95 lcd_enable_hook = enable_hook; 84 lcd_activation_hook = func;
96} 85}
97 86
98/* To be called by target driver after enabling display and refreshing it */ 87/* To be called by target driver after enabling display and refreshing it */
99void lcd_call_enable_hook(void) 88void lcd_activation_call_hook(void)
100{ 89{
101 void (*enable_hook)(void) = lcd_enable_hook; 90 void (*func)(void) = lcd_activation_hook;
102 91
103 if (enable_hook != NULL) 92 if (func != NULL)
104 enable_hook(); 93 func();
105} 94}
95
106#endif 96#endif
107 97
98/* LCD init */
99void lcd_init(void)
100{
101 lcd_clear_display();
102
103 /* Call device specific init */
104 lcd_init_device();
105 scroll_init();
106}
108/*** Viewports ***/ 107/*** Viewports ***/
109 108
110void lcd_set_viewport(struct viewport* vp) 109void lcd_set_viewport(struct viewport* vp)
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index e435d174f2..e34fac5d31 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -341,21 +341,21 @@ void lcd_poweroff(void);
341#ifdef HAVE_LCD_ENABLE 341#ifdef HAVE_LCD_ENABLE
342/* Enable/disable the main display. */ 342/* Enable/disable the main display. */
343extern void lcd_enable(bool on); 343extern void lcd_enable(bool on);
344extern bool lcd_enabled(void);
345
346#ifdef HAVE_LCD_COLOR
347/* Register a hook that is called when the lcd is powered and after the
348 * framebuffer data is synchronized */
349void lcd_set_enable_hook(void (*enable_hook)(void));
350#endif /* HAVE_LCD_COLOR */
351
352#endif /* HAVE_LCD_ENABLE */ 344#endif /* HAVE_LCD_ENABLE */
353void lcd_call_enable_hook(void);
354 345
355#ifdef HAVE_LCD_SLEEP 346#ifdef HAVE_LCD_SLEEP
356/* Put the LCD into a power saving state deeper than lcd_enable(false). */ 347/* Put the LCD into a power saving state deeper than lcd_enable(false). */
357extern void lcd_sleep(void); 348extern void lcd_sleep(void);
358#endif /* HAVE_LCD_SLEEP */ 349#endif /* HAVE_LCD_SLEEP */
350#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
351/* Register a hook that is called when the lcd is powered and after the
352 * framebuffer data is synchronized */
353/* Sansa Clip has these function in it's lcd driver, since it's the only
354 * 1-bit display featuring lcd_active, so far */
355extern bool lcd_active(void);
356extern void lcd_activation_set_hook(void (*enable_hook)(void));
357extern void lcd_activation_call_hook(void);
358#endif
359 359
360#ifdef HAVE_LCD_SHUTDOWN 360#ifdef HAVE_LCD_SHUTDOWN
361void lcd_shutdown(void); 361void lcd_shutdown(void);
diff --git a/firmware/scroll_engine.c b/firmware/scroll_engine.c
index 6c7f7e6eb0..8d84c797e9 100644
--- a/firmware/scroll_engine.c
+++ b/firmware/scroll_engine.c
@@ -305,8 +305,8 @@ static void scroll_thread(void)
305 305
306 if (scroll & SCROLL_LCD) 306 if (scroll & SCROLL_LCD)
307 { 307 {
308#ifdef HAVE_LCD_ENABLE 308#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
309 if (lcd_enabled()) 309 if (lcd_active())
310#endif 310#endif
311 lcd_scroll_fn(); 311 lcd_scroll_fn();
312 lcd_scroll_info.last_scroll = current_tick; 312 lcd_scroll_info.last_scroll = current_tick;
@@ -328,8 +328,8 @@ static void scroll_thread(void)
328 while (1) 328 while (1)
329 { 329 {
330 sleep(lcd_scroll_info.ticks); 330 sleep(lcd_scroll_info.ticks);
331#ifdef HAVE_LCD_ENABLE 331#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
332 if (lcd_enabled()) 332 if (lcd_active())
333#endif 333#endif
334 lcd_scroll_fn(); 334 lcd_scroll_fn();
335 } 335 }
diff --git a/firmware/target/arm/as3525/sansa-c200v2/lcd-c200v2.c b/firmware/target/arm/as3525/sansa-c200v2/lcd-c200v2.c
index 2fc3e1f6c5..88adcd9d96 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)
322 if(on) 322 if(on)
323 { 323 {
324 _display_on(); 324 _display_on();
325 lcd_call_enable_hook(); 325 lcd_activation_call_hook();
326 } 326 }
327 else 327 else
328 { 328 {
@@ -332,7 +332,7 @@ void lcd_enable(bool on)
332 } 332 }
333} 333}
334 334
335bool lcd_enabled(void) 335bool lcd_active(void)
336{ 336{
337 return display_on; 337 return display_on;
338} 338}
diff --git a/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c b/firmware/target/arm/as3525/sansa-clip/lcd-ssd1303.c
index bfa02e796d..640f6694c9 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)
159 } 159 }
160} 160}
161 161
162#ifdef HAVE_LCD_ENABLE
163static void (*lcd_activation_hook)(void) = NULL;
164
165void lcd_activation_set_hook(void (*func)(void))
166{
167 lcd_activation_hook = func;
168}
169
170void lcd_activation_call_hook(void)
171{
172 void (*func)(void) = lcd_activation_hook;
173
174 if (func != NULL)
175 func();
176}
177
178
162void lcd_enable(bool enable) 179void lcd_enable(bool enable)
163{ 180{
164 if(display_on == enable) 181 if(display_on == enable)
165 return; 182 return;
166 183
167 if( (display_on = enable) ) /* simple '=' is not a typo ! */ 184 if( (display_on = enable) ) /* simple '=' is not a typo ! */
185 {
168 lcd_write_command(LCD_SET_DISPLAY_ON); 186 lcd_write_command(LCD_SET_DISPLAY_ON);
187 lcd_activation_call_hook();
188 }
169 else 189 else
170 lcd_write_command(LCD_SET_DISPLAY_OFF); 190 lcd_write_command(LCD_SET_DISPLAY_OFF);
171} 191}
172 192
173bool lcd_enabled(void) 193bool lcd_active(void)
174{ 194{
175 return display_on; 195 return display_on;
176} 196}
177 197
198#endif
178 199
179/* LCD init, largely based on what OF does */ 200/* LCD init, largely based on what OF does */
180void lcd_init_device(void) 201void 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 57d5649570..8715622717 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)
328 if(on) 328 if(on)
329 { 329 {
330 _display_on(); 330 _display_on();
331 lcd_call_enable_hook(); 331 lcd_activation_call_hook();
332 } 332 }
333 else 333 else
334 { 334 {
@@ -338,7 +338,7 @@ void lcd_enable(bool on)
338 } 338 }
339} 339}
340 340
341bool lcd_enabled(void) 341bool lcd_active(void)
342{ 342{
343 return display_on; 343 return display_on;
344} 344}
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
index 44451133ca..5196784a2f 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)
206 /* a bit of delay before returning to 206 /* a bit of delay before returning to
207 * avoid irritating flash on backlight on */ 207 * avoid irritating flash on backlight on */
208 while(delay--); 208 while(delay--);
209 lcd_activation_call_hook();
209 210
210 } 211 }
211 else 212 else
@@ -217,7 +218,7 @@ void lcd_enable(bool on)
217 } 218 }
218} 219}
219 220
220bool lcd_enabled(void) 221bool lcd_active(void)
221{ 222{
222 return display_on; 223 return display_on;
223} 224}
diff --git a/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c b/firmware/target/arm/imx31/gigabeat-s/lcd-imx31.c
index 47834b3b19..bddf03c5f6 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)
121 lcd_powered = true; 121 lcd_powered = true;
122 lcd_on = true; 122 lcd_on = true;
123 lcd_update(); 123 lcd_update();
124 lcd_call_enable_hook(); 124 lcd_activation_call_hook();
125 } 125 }
126 else 126 else
127 { 127 {
@@ -129,7 +129,7 @@ void lcd_enable(bool state)
129 } 129 }
130} 130}
131 131
132bool lcd_enabled(void) 132bool lcd_active(void)
133{ 133{
134 return lcd_on; 134 return lcd_on;
135} 135}
diff --git a/firmware/target/arm/ipod/video/lcd-video.c b/firmware/target/arm/ipod/video/lcd-video.c
index d1701ea3d7..c0e98cf53c 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)
575 lcd_state.state = LCD_INITIAL; 575 lcd_state.state = LCD_INITIAL;
576 tick_add_task(&lcd_tick); 576 tick_add_task(&lcd_tick);
577 lcd_state.display_on = true; 577 lcd_state.display_on = true;
578 /* Note that only the RGB data from lcd_framebuffer has been 578 lcd_activation_call_hook();
579 displayed. If YUV data was displayed, it needs to be updated
580 now. (eg. see lcd_call_enable_hook())
581 */
582 } 579 }
583 mutex_unlock(&lcdstate_lock); 580 mutex_unlock(&lcdstate_lock);
584} 581}
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_20gb.c b/firmware/target/arm/iriver/h10/lcd-h10_20gb.c
index ffd8ab69ec..03a398af8d 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)
363 /* Probably out of sync and we don't wanna pepper the code with 363 /* Probably out of sync and we don't wanna pepper the code with
364 lcd_update() calls for this. */ 364 lcd_update() calls for this. */
365 lcd_update(); 365 lcd_update();
366 lcd_call_enable_hook(); 366 lcd_activation_call_hook();
367 } 367 }
368 else 368 else
369 { 369 {
@@ -371,7 +371,7 @@ void lcd_enable(bool on)
371 } 371 }
372} 372}
373 373
374bool lcd_enabled(void) 374bool lcd_active(void)
375{ 375{
376 return display_on; 376 return display_on;
377} 377}
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 d9a28d152f..fd52eda5e9 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;
42extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src, 42extern void lcd_copy_buffer_rect(fb_data *dst, const fb_data *src,
43 int width, int height); 43 int width, int height);
44 44
45bool lcd_enabled(void) 45bool lcd_active(void)
46{ 46{
47 return lcd_on; 47 return lcd_on;
48} 48}
@@ -308,7 +308,7 @@ void lcd_enable(bool state)
308 308
309 lcd_on = true; 309 lcd_on = true;
310 lcd_update(); 310 lcd_update();
311 lcd_call_enable_hook(); 311 lcd_activation_call_hook();
312 } 312 }
313 else 313 else
314 { 314 {
diff --git a/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c b/firmware/target/arm/sandisk/sansa-e200/lcd-e200.c
index e477f4fd45..e1a4d738d7 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)
438 DEV_EN |= DEV_LCD; /* Enable LCD controller */ 438 DEV_EN |= DEV_LCD; /* Enable LCD controller */
439 lcd_display_on(); /* Turn on display */ 439 lcd_display_on(); /* Turn on display */
440 lcd_update(); /* Resync display */ 440 lcd_update(); /* Resync display */
441 lcd_call_enable_hook(); 441 lcd_activation_call_hook();
442 LCD_REG_6 |= 1; /* Restart DMA */ 442 LCD_REG_6 |= 1; /* Restart DMA */
443 sleep(HZ/50); /* Wait for a frame to be written */ 443 sleep(HZ/50); /* Wait for a frame to be written */
444 } 444 }
@@ -451,7 +451,7 @@ void lcd_enable(bool on)
451 } 451 }
452} 452}
453 453
454bool lcd_enabled(void) 454bool lcd_active(void)
455{ 455{
456 return display_on; 456 return display_on;
457} 457}
diff --git a/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c b/firmware/target/arm/tcc77x/iaudio7/lcd-iaudio7.c
index 0ca18bee67..134d936e7b 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)
143 143
144 if (on) { 144 if (on) {
145 _display_on(); 145 _display_on();
146 lcd_call_enable_hook(); 146 lcd_activation_call_hook();
147 } else { 147 } else {
148 /** Off sequence according to datasheet, p. 130 **/ 148 /** Off sequence according to datasheet, p. 130 **/
149 lcd_write_reg(R_FRAME_CYCLE_CONTROL, 0x0002); /* EQ=0, 18 clks/line */ 149 lcd_write_reg(R_FRAME_CYCLE_CONTROL, 0x0002); /* EQ=0, 18 clks/line */
@@ -166,7 +166,7 @@ void lcd_enable(bool on)
166 } 166 }
167} 167}
168 168
169bool lcd_enabled(void) 169bool lcd_active(void)
170{ 170{
171 return display_on; 171 return display_on;
172} 172}
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c
index d6ee5f3649..7b64493c0a 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)
230 lcd_display_on(); 230 lcd_display_on();
231 LCDC_CTRL |= 1; /* controller enable */ 231 LCDC_CTRL |= 1; /* controller enable */
232 lcd_update(); /* Resync display */ 232 lcd_update(); /* Resync display */
233 lcd_call_enable_hook(); 233 lcd_activation_call_hook();
234 } 234 }
235 else 235 else
236 { 236 {
@@ -239,7 +239,7 @@ void lcd_enable(bool on)
239 } 239 }
240} 240}
241 241
242bool lcd_enabled(void) 242bool lcd_active(void)
243{ 243{
244 return display_on; 244 return display_on;
245} 245}
diff --git a/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c b/firmware/target/arm/tms320dm320/creative-zvm/lcd-creativezvm.c
index f34e43687a..cd07fa9e6f 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;
237 { 237 {
238 lcd_display_on(false); /* Turn on display */ 238 lcd_display_on(false); /* Turn on display */
239 lcd_update(); /* Resync display */ 239 lcd_update(); /* Resync display */
240 lcd_call_enable_hook(); 240 lcd_activation_call_hook();
241 } 241 }
242 else 242 else
243 { 243 {
@@ -245,7 +245,7 @@ return;
245 } 245 }
246} 246}
247 247
248bool lcd_enabled(void) 248bool lcd_active(void)
249{ 249{
250 return display_on; 250 return display_on;
251} 251}
diff --git a/firmware/target/coldfire/iaudio/x5/lcd-x5.c b/firmware/target/coldfire/iaudio/x5/lcd-x5.c
index fca39e6e26..4737f31bc8 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)
385 /* Probably out of sync and we don't wanna pepper the code with 385 /* Probably out of sync and we don't wanna pepper the code with
386 lcd_update() calls for this. */ 386 lcd_update() calls for this. */
387 lcd_update(); 387 lcd_update();
388 lcd_call_enable_hook(); 388 lcd_activation_call_hook();
389 } 389 }
390 else 390 else
391 { 391 {
@@ -393,7 +393,7 @@ void lcd_enable(bool on)
393 } 393 }
394} 394}
395 395
396bool lcd_enabled(void) 396bool lcd_active(void)
397{ 397{
398 return display_on; 398 return display_on;
399} 399}
diff --git a/firmware/target/coldfire/iriver/h300/lcd-h300.c b/firmware/target/coldfire/iriver/h300/lcd-h300.c
index 3c70e5be17..867bc5ab74 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)
263 if(on) 263 if(on)
264 { 264 {
265 _display_on(); 265 _display_on();
266 lcd_call_enable_hook(); 266 lcd_activation_call_hook();
267 } 267 }
268 else 268 else
269 { 269 {
@@ -290,7 +290,7 @@ void lcd_enable(bool on)
290 } 290 }
291} 291}
292 292
293bool lcd_enabled(void) 293bool lcd_active(void)
294{ 294{
295 return display_on; 295 return display_on;
296} 296}
diff --git a/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c b/firmware/target/mips/ingenic_jz47xx/lcd-jz4740.c
index d9eb3ecdef..783621c88b 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)
54 { 54 {
55 lcd_on(); 55 lcd_on();
56#ifdef HAVE_LCD_ENABLE 56#ifdef HAVE_LCD_ENABLE
57 lcd_call_enable_hook(); 57 lcd_activation_call_hook();
58#endif 58#endif
59 } 59 }
60 else 60 else
@@ -63,7 +63,7 @@ void lcd_enable(bool state)
63 lcd_is_on = state; 63 lcd_is_on = state;
64} 64}
65 65
66bool lcd_enabled(void) 66bool lcd_active(void)
67{ 67{
68 return lcd_is_on; 68 return lcd_is_on;
69} 69}