summaryrefslogtreecommitdiff
path: root/apps/plugins/lib/gray_core.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/lib/gray_core.c')
-rw-r--r--apps/plugins/lib/gray_core.c25
1 files changed, 5 insertions, 20 deletions
diff --git a/apps/plugins/lib/gray_core.c b/apps/plugins/lib/gray_core.c
index 02477b5b82..7fcd3dac80 100644
--- a/apps/plugins/lib/gray_core.c
+++ b/apps/plugins/lib/gray_core.c
@@ -226,38 +226,23 @@ void gray_release(void)
226 lcd_set_invert_display(), lcd_set_flip(), lcd_roll() */ 226 lcd_set_invert_display(), lcd_set_flip(), lcd_roll() */
227void gray_show(bool enable) 227void gray_show(bool enable)
228{ 228{
229#if (CONFIG_CPU == SH7034) && (CONFIG_LCD == LCD_SSD1815)
230 if (enable)
231 {
232 _gray_info.flags |= _GRAY_RUNNING;
233 _gray_rb->timer_register(1, NULL, FREQ / 67, 1, _timer_isr);
234 _gray_rb->screen_dump_set_hook(gray_screendump_hook);
235 }
236 else
237 {
238 _gray_rb->timer_unregister();
239 _gray_info.flags &= ~_GRAY_RUNNING;
240 _gray_rb->screen_dump_set_hook(NULL);
241 _gray_rb->lcd_update(); /* restore whatever there was before */
242 }
243#elif defined(CPU_COLDFIRE) && (CONFIG_LCD == LCD_S1D15E06)
244 if (enable && !(_gray_info.flags & _GRAY_RUNNING)) 229 if (enable && !(_gray_info.flags & _GRAY_RUNNING))
245 { 230 {
246 _gray_info.flags |= _GRAY_RUNNING; 231 _gray_info.flags |= _GRAY_RUNNING;
247 _gray_rb->cpu_boost(true); /* run at 120 MHz to avoid freq changes */ 232#if CONFIG_LCD == LCD_SSD1815
248 _gray_rb->timer_register(1, NULL, *_gray_rb->cpu_frequency / 70, 1, 233 _gray_rb->timer_register(1, NULL, CPU_FREQ / 67, 1, _timer_isr);
249 _timer_isr); 234#elif CONFIG_LCD == LCD_S1D15E06
235 _gray_rb->timer_register(1, NULL, CPU_FREQ / 70, 1, _timer_isr);
236#endif
250 _gray_rb->screen_dump_set_hook(gray_screendump_hook); 237 _gray_rb->screen_dump_set_hook(gray_screendump_hook);
251 } 238 }
252 else if (!enable && (_gray_info.flags & _GRAY_RUNNING)) 239 else if (!enable && (_gray_info.flags & _GRAY_RUNNING))
253 { 240 {
254 _gray_rb->timer_unregister(); 241 _gray_rb->timer_unregister();
255 _gray_rb->cpu_boost(false);
256 _gray_info.flags &= ~_GRAY_RUNNING; 242 _gray_info.flags &= ~_GRAY_RUNNING;
257 _gray_rb->screen_dump_set_hook(NULL); 243 _gray_rb->screen_dump_set_hook(NULL);
258 _gray_rb->lcd_update(); /* restore whatever there was before */ 244 _gray_rb->lcd_update(); /* restore whatever there was before */
259 } 245 }
260#endif
261} 246}
262 247
263/* Update a rectangular area of the greyscale overlay */ 248/* Update a rectangular area of the greyscale overlay */