diff options
author | Jens Arnold <amiconn@rockbox.org> | 2005-07-26 20:01:11 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2005-07-26 20:01:11 +0000 |
commit | e44372ef18cbf30f0e174ed76be4ee4e6206f2cc (patch) | |
tree | 8860863bbfb7a6151173e7428900d9de2bdbba73 /apps/plugins/metronome.c | |
parent | c20a00ef3e35b15acf422a2e7f6716abde840c24 (diff) |
Moved implementation of user timer to the firmware layer, implemented it for iriver, and made it shareable based on priorities. On iriver, the user timer is shared between the backlight fading and other use, so if a plugin registers the timer, the backlight will resort to simple on/off switching until the plugin releases the timer again. Sorted and bumped the plugin api.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@7242 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/metronome.c')
-rw-r--r-- | apps/plugins/metronome.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c index 3793fd9690..fa5520b635 100644 --- a/apps/plugins/metronome.c +++ b/apps/plugins/metronome.c @@ -235,7 +235,7 @@ void cleanup(void *parameter) { (void)parameter; - rb->plugin_unregister_timer(); + rb->timer_unregister(); rb->mp3_play_stop(); /* stop audio ISR */ led(0); } @@ -278,7 +278,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter){ rb->mp3_play_stop(); // stop audio ISR calc_period(); - rb->plugin_register_timer(((*rb->cpu_frequency)/1024), 1, timer_callback); + rb->timer_register(1, NULL, (*rb->cpu_frequency)/1024, 1, timer_callback); draw_display(); |