summaryrefslogtreecommitdiff
path: root/firmware/drivers
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-10-20 21:54:59 +0000
committerThomas Martitz <kugel@rockbox.org>2009-10-20 21:54:59 +0000
commitd85c3ec41020a6c56b0d5d95a9ed790f57d73c6e (patch)
tree2f51ed47fee689024ed8c145634044362c8ed7d5 /firmware/drivers
parent774bacc692b4d5c7b769bb88d24e182db9e4656f (diff)
downloadrockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.tar.gz
rockbox-d85c3ec41020a6c56b0d5d95a9ed790f57d73c6e.zip
Convert lcd_activation callbacks to use the event system to allow for multiple parallel callbacks (for custom statusbar).
Increase maximum event count as we need more (I actually had a report about it during custom statusbar testing). Removed corresponding functions from the core and plugin api. Bump min version and sort. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@23302 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers')
-rw-r--r--firmware/drivers/lcd-16bit-vert.c21
-rw-r--r--firmware/drivers/lcd-16bit.c21
-rw-r--r--firmware/drivers/lcd-1bit-vert.c19
3 files changed, 0 insertions, 61 deletions
diff --git a/firmware/drivers/lcd-16bit-vert.c b/firmware/drivers/lcd-16bit-vert.c
index 887505766c..1e49bb354d 100644
--- a/firmware/drivers/lcd-16bit-vert.c
+++ b/firmware/drivers/lcd-16bit-vert.c
@@ -75,27 +75,6 @@ static struct viewport* current_vp IDATA_ATTR = &default_vp;
75struct viewport* current_vp IDATA_ATTR = &default_vp; 75struct viewport* current_vp IDATA_ATTR = &default_vp;
76#endif 76#endif
77 77
78
79/*** Helpers - consolidate optional code ***/
80#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
81static void (*lcd_activation_hook)(void) = NULL;
82
83void lcd_activation_set_hook(void (*func)(void))
84{
85 lcd_activation_hook = func;
86}
87
88/* To be called by target driver after enabling display and refreshing it */
89void lcd_activation_call_hook(void)
90{
91 void (*func)(void) = lcd_activation_hook;
92
93 if (func != NULL)
94 func();
95}
96
97#endif
98
99/* LCD init */ 78/* LCD init */
100void lcd_init(void) 79void lcd_init(void)
101{ 80{
diff --git a/firmware/drivers/lcd-16bit.c b/firmware/drivers/lcd-16bit.c
index 7238d7a923..d1b417a00a 100644
--- a/firmware/drivers/lcd-16bit.c
+++ b/firmware/drivers/lcd-16bit.c
@@ -74,27 +74,6 @@ static struct viewport* current_vp IDATA_ATTR = &default_vp;
74struct viewport* current_vp IDATA_ATTR = &default_vp; 74struct viewport* current_vp IDATA_ATTR = &default_vp;
75#endif 75#endif
76 76
77
78/*** Helpers - consolidate optional code ***/
79#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
80static void (*lcd_activation_hook)(void) = NULL;
81
82void lcd_activation_set_hook(void (*func)(void))
83{
84 lcd_activation_hook = func;
85}
86
87/* To be called by target driver after enabling display and refreshing it */
88void lcd_activation_call_hook(void)
89{
90 void (*func)(void) = lcd_activation_hook;
91
92 if (func != NULL)
93 func();
94}
95
96#endif
97
98/* LCD init */ 77/* LCD init */
99void lcd_init(void) 78void lcd_init(void)
100{ 79{
diff --git a/firmware/drivers/lcd-1bit-vert.c b/firmware/drivers/lcd-1bit-vert.c
index dd6c7cd354..9607f284aa 100644
--- a/firmware/drivers/lcd-1bit-vert.c
+++ b/firmware/drivers/lcd-1bit-vert.c
@@ -91,25 +91,6 @@ void LCDFN(init)(void)
91#endif 91#endif
92} 92}
93 93
94#ifdef MAIN_LCD
95#if defined(HAVE_LCD_ENABLE) || defined(HAVE_LCD_SLEEP)
96static void (*lcd_activation_hook)(void) = NULL;
97
98void lcd_activation_set_hook(void (*func)(void))
99{
100 lcd_activation_hook = func;
101}
102
103void lcd_activation_call_hook(void)
104{
105 void (*func)(void) = lcd_activation_hook;
106
107 if (func != NULL)
108 func();
109}
110#endif
111#endif
112
113/*** parameter handling ***/ 94/*** parameter handling ***/
114 95
115void LCDFN(set_drawmode)(int mode) 96void LCDFN(set_drawmode)(int mode)