diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-04-02 12:45:30 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-04-02 12:45:30 +0000 |
commit | 1be25a4d7157862e379e502b33079a8313c365c0 (patch) | |
tree | f1b9b8a138bd9dde342c40c16e2573267c9b19a4 | |
parent | 139acd9c576a82eba9cb8d545251686d309abec6 (diff) | |
download | rockbox-1be25a4d7157862e379e502b33079a8313c365c0.tar.gz rockbox-1be25a4d7157862e379e502b33079a8313c365c0.zip |
Use TIMER_FREQ for timers in plugins. Fixes timer speed on iPod.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9427 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | apps/plugins/alpine_cdc.c | 4 | ||||
-rw-r--r-- | apps/plugins/doom/i_system.c | 7 | ||||
-rw-r--r-- | apps/plugins/lib/gray_core.c | 4 | ||||
-rw-r--r-- | apps/plugins/metronome.c | 2 |
4 files changed, 10 insertions, 7 deletions
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c index 91cfb0ecdc..a482664d6a 100644 --- a/apps/plugins/alpine_cdc.c +++ b/apps/plugins/alpine_cdc.c | |||
@@ -219,8 +219,8 @@ void timer_init(unsigned hz, unsigned to) | |||
219 | { | 219 | { |
220 | rb->memset(&gTimer, 0, sizeof(gTimer)); | 220 | rb->memset(&gTimer, 0, sizeof(gTimer)); |
221 | 221 | ||
222 | gTimer.transmit = FREQ / hz; /* time for bit transitions */ | 222 | gTimer.transmit = TIMER_FREQ / hz; /* time for bit transitions */ |
223 | gTimer.timeout = FREQ / to; /* time for receive timeout */ | 223 | gTimer.timeout = TIMER_FREQ / to; /* time for receive timeout */ |
224 | } | 224 | } |
225 | 225 | ||
226 | 226 | ||
diff --git a/apps/plugins/doom/i_system.c b/apps/plugins/doom/i_system.c index ad1001cf8b..8a53f21b9f 100644 --- a/apps/plugins/doom/i_system.c +++ b/apps/plugins/doom/i_system.c | |||
@@ -16,7 +16,10 @@ | |||
16 | // GNU General Public License for more details. | 16 | // GNU General Public License for more details. |
17 | // | 17 | // |
18 | // $Log$ | 18 | // $Log$ |
19 | // Revision 1.2 2006/04/02 01:52:44 kkurbjun | 19 | // Revision 1.3 2006/04/02 12:45:29 amiconn |
20 | // Use TIMER_FREQ for timers in plugins. Fixes timer speed on iPod. | ||
21 | // | ||
22 | // Revision 1.2 2006-04-02 01:52:44 kkurbjun | ||
20 | // Update adds prboom's high resolution support, also makes the scaling for platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table code has been removed. Also fixed a pallete bug. Some graphic errors are present in menu and status bar. Also updates some headers and output formatting. | 23 | // Update adds prboom's high resolution support, also makes the scaling for platforms w/ resolution less then 320x200 much nicer. IDoom's lookup table code has been removed. Also fixed a pallete bug. Some graphic errors are present in menu and status bar. Also updates some headers and output formatting. |
21 | // | 24 | // |
22 | // Revision 1.1 2006-03-28 15:44:01 dave | 25 | // Revision 1.1 2006-03-28 15:44:01 dave |
@@ -84,7 +87,7 @@ int I_GetTime (void) | |||
84 | void I_Init (void) | 87 | void I_Init (void) |
85 | { | 88 | { |
86 | #if (CONFIG_CPU != PP5020) && !defined(SIMULATOR) | 89 | #if (CONFIG_CPU != PP5020) && !defined(SIMULATOR) |
87 | rb->timer_register(1, NULL, CPU_FREQ/TICRATE, 1, doomtime); | 90 | rb->timer_register(1, NULL, TIMER_FREQ/TICRATE, 1, doomtime); |
88 | #endif | 91 | #endif |
89 | I_InitSound(); | 92 | I_InitSound(); |
90 | } | 93 | } |
diff --git a/apps/plugins/lib/gray_core.c b/apps/plugins/lib/gray_core.c index 80ce984b29..c70582c903 100644 --- a/apps/plugins/lib/gray_core.c +++ b/apps/plugins/lib/gray_core.c | |||
@@ -278,9 +278,9 @@ void gray_show(bool enable) | |||
278 | gray_update(); | 278 | gray_update(); |
279 | #else /* !SIMULATOR */ | 279 | #else /* !SIMULATOR */ |
280 | #if CONFIG_LCD == LCD_SSD1815 | 280 | #if CONFIG_LCD == LCD_SSD1815 |
281 | _gray_rb->timer_register(1, NULL, CPU_FREQ / 67, 1, _timer_isr); | 281 | _gray_rb->timer_register(1, NULL, TIMER_FREQ / 67, 1, _timer_isr); |
282 | #elif CONFIG_LCD == LCD_S1D15E06 | 282 | #elif CONFIG_LCD == LCD_S1D15E06 |
283 | _gray_rb->timer_register(1, NULL, CPU_FREQ / 70, 1, _timer_isr); | 283 | _gray_rb->timer_register(1, NULL, TIMER_FREQ / 70, 1, _timer_isr); |
284 | #elif CONFIG_LCD == LCD_IFP7XX | 284 | #elif CONFIG_LCD == LCD_IFP7XX |
285 | /* TODO: implement for iFP */ | 285 | /* TODO: implement for iFP */ |
286 | (void)_timer_isr; | 286 | (void)_timer_isr; |
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index 0206b3028a..04ebdae1c0 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c | |||
@@ -923,7 +923,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){ | |||
923 | #endif | 923 | #endif |
924 | 924 | ||
925 | calc_period(); | 925 | calc_period(); |
926 | rb->timer_register(1, NULL, CPU_FREQ/1024, 1, timer_callback); | 926 | rb->timer_register(1, NULL, TIMER_FREQ/1024, 1, timer_callback); |
927 | draw_display(); | 927 | draw_display(); |
928 | 928 | ||
929 | /* main loop */ | 929 | /* main loop */ |