cvs | 3 Oct 2005 11:24
Picon
Favicon

amiconn: apps/plugins/lib gray_core.c,1.6,1.7

Update of /cvsroot/rockbox/apps/plugins/lib
In directory labb:/tmp/cvs-serv7871/apps/plugins/lib

Modified Files:
	gray_core.c 
Log Message:
Coldfire: New timer handling on CPU frequency change, adjusting the prescaler on the fly, for both tick and
user timer. Precondition is that the higher frequencies are integer multiples of the base: now NORMAL is
45 MHz and MAX is 124 MHz. Removes the need for applications with longer timer periods (>= 10 ms) to boost the
CPU all the time, e.g. the grayscale lib. Timer counts are now always based on the base frequency
(CPU_FREQ). * Adjusted the RAM refresh timers to the new frequencies (all frequencies for H100) * All:
Fixed the tick timer count being off by one.

Index: gray_core.c
===================================================================
RCS file: /cvsroot/rockbox/apps/plugins/lib/gray_core.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- gray_core.c	1 Oct 2005 10:20:55 -0000	1.6
+++ gray_core.c	3 Oct 2005 09:24:36 -0000	1.7
 <at>  <at>  -226,38 +226,23  <at>  <at> 
    lcd_set_invert_display(), lcd_set_flip(), lcd_roll() */
 void gray_show(bool enable)
 {
-#if (CONFIG_CPU == SH7034) && (CONFIG_LCD == LCD_SSD1815)
-    if (enable)
-    {
-        _gray_info.flags |= _GRAY_RUNNING;
-        _gray_rb->timer_register(1, NULL, FREQ / 67, 1, _timer_isr);
-        _gray_rb->screen_dump_set_hook(gray_screendump_hook);
-    }
-    else
-    {
-        _gray_rb->timer_unregister();
-        _gray_info.flags &= ~_GRAY_RUNNING;
-        _gray_rb->screen_dump_set_hook(NULL);
-        _gray_rb->lcd_update(); /* restore whatever there was before */
-    }
-#elif defined(CPU_COLDFIRE) && (CONFIG_LCD == LCD_S1D15E06)
     if (enable && !(_gray_info.flags & _GRAY_RUNNING))
     {
         _gray_info.flags |= _GRAY_RUNNING;
-        _gray_rb->cpu_boost(true);  /* run at 120 MHz to avoid freq changes */
-        _gray_rb->timer_register(1, NULL, *_gray_rb->cpu_frequency / 70, 1,
-                                 _timer_isr);
+#if CONFIG_LCD == LCD_SSD1815
+        _gray_rb->timer_register(1, NULL, CPU_FREQ / 67, 1, _timer_isr);
+#elif CONFIG_LCD == LCD_S1D15E06
+        _gray_rb->timer_register(1, NULL, CPU_FREQ / 70, 1, _timer_isr);
+#endif
         _gray_rb->screen_dump_set_hook(gray_screendump_hook);
     }
     else if (!enable && (_gray_info.flags & _GRAY_RUNNING))
     {
         _gray_rb->timer_unregister();
-        _gray_rb->cpu_boost(false);
         _gray_info.flags &= ~_GRAY_RUNNING;
         _gray_rb->screen_dump_set_hook(NULL);
         _gray_rb->lcd_update(); /* restore whatever there was before */
     }
-#endif
 }

 /* Update a rectangular area of the greyscale overlay */

_______________________________________________
rockbox-cvs mailing list
rockbox-cvs <at> cool.haxx.se
http://cool.haxx.se/cgi-bin/mailman/listinfo/rockbox-cvs


Gmane