summaryrefslogtreecommitdiff
path: root/apps/plugins/lamp.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lamp.c')
-rw-r--r--apps/plugins/lamp.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/plugins/lamp.c b/apps/plugins/lamp.c
index 337ea85f43..1d99ef64d3 100644
--- a/apps/plugins/lamp.c
+++ b/apps/plugins/lamp.c
@@ -99,8 +99,6 @@ PLUGIN_HEADER
99# endif 99# endif
100#endif 100#endif
101 101
102static const struct plugin_api* rb; /* global api struct pointer */
103
104#ifdef HAVE_LCD_COLOR 102#ifdef HAVE_LCD_COLOR
105/* RGB color sets */ 103/* RGB color sets */
106#define NUM_COLORSETS 2 104#define NUM_COLORSETS 2
@@ -109,11 +107,10 @@ static int colorset[NUM_COLORSETS][3] = { { 255, 255, 255 } , /* white */
109#endif /* HAVE_LCD_COLOR */ 107#endif /* HAVE_LCD_COLOR */
110 108
111/* this is the plugin entry point */ 109/* this is the plugin entry point */
112enum plugin_status plugin_start(const struct plugin_api* api, const void* parameter) 110enum plugin_status plugin_start(const void* parameter)
113{ 111{
114 long button; 112 long button;
115 (void)parameter; 113 (void)parameter;
116 rb = api;
117 114
118#ifdef HAVE_LCD_COLOR 115#ifdef HAVE_LCD_COLOR
119 int cs = 0; 116 int cs = 0;
@@ -151,9 +148,9 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
151#endif /* MROBE_100 */ 148#endif /* MROBE_100 */
152#endif /* HAVE_LCD_INVERT */ 149#endif /* HAVE_LCD_INVERT */
153 150
154 backlight_force_on(rb); 151 backlight_force_on();
155#ifdef HAVE_BUTTON_LIGHT 152#ifdef HAVE_BUTTON_LIGHT
156 buttonlight_force_on(rb); 153 buttonlight_force_on();
157#endif /* HAVE_BUTTON_LIGHT */ 154#endif /* HAVE_BUTTON_LIGHT */
158 155
159#ifdef HAVE_LCD_COLOR 156#ifdef HAVE_LCD_COLOR
@@ -220,9 +217,9 @@ enum plugin_status plugin_start(const struct plugin_api* api, const void* parame
220#endif /*HAVE_LCD_COLOR */ 217#endif /*HAVE_LCD_COLOR */
221 218
222 /* restore */ 219 /* restore */
223 backlight_use_settings(rb); 220 backlight_use_settings();
224#ifdef HAVE_BUTTON_LIGHT 221#ifdef HAVE_BUTTON_LIGHT
225 buttonlight_use_settings(rb); 222 buttonlight_use_settings();
226#endif /* HAVE_BUTTON_LIGHT */ 223#endif /* HAVE_BUTTON_LIGHT */
227 224
228#ifdef HAVE_LCD_INVERT 225#ifdef HAVE_LCD_INVERT