summaryrefslogtreecommitdiff
path: root/firmware/kernel.c
diff options
context:
space:
mode:
authorDave Chapman <dave@dchapman.com>2006-01-12 00:35:50 +0000
committerDave Chapman <dave@dchapman.com>2006-01-12 00:35:50 +0000
commitd83e929f3fc369a5981e1e40e1c5307169a46cfc (patch)
treeac323ca5811374a030a1b65bb77fc7ccc163db04 /firmware/kernel.c
parent8d130684214d23a9163810d1dacc33d108f2338a (diff)
downloadrockbox-d83e929f3fc369a5981e1e40e1c5307169a46cfc.tar.gz
rockbox-d83e929f3fc369a5981e1e40e1c5307169a46cfc.zip
Work-in-progress iriver iFP-7xx port by Tomasz Malesinski
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@8342 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/kernel.c')
-rw-r--r--firmware/kernel.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/firmware/kernel.c b/firmware/kernel.c
index a353c4bdc9..b30a3bb12b 100644
--- a/firmware/kernel.c
+++ b/firmware/kernel.c
@@ -358,6 +358,41 @@ void tick_start(unsigned int interval_in_ms)
358#endif 358#endif
359} 359}
360 360
361#elif CONFIG_CPU == PNX0101
362
363void timer_handler(void)
364{
365 int i;
366
367 /* Run through the list of tick tasks */
368 for(i = 0;i < MAX_NUM_TICK_TASKS;i++)
369 {
370 if(tick_funcs[i])
371 tick_funcs[i]();
372 }
373
374 current_tick++;
375 wake_up_thread();
376
377 TIMERR0C = 1;
378}
379
380void tick_start(unsigned int interval_in_ms)
381{
382 TIMERR08 &= ~0x80;
383 TIMERR0C = 1;
384 TIMERR08 &= ~0x80;
385 TIMERR08 |= 0x40;
386 TIMERR00 = 3000000 * interval_in_ms / 1000;
387 TIMERR08 &= ~0xc;
388 TIMERR0C = 1;
389
390 irq_set_int_handler(4, timer_handler);
391 irq_enable_int(4);
392
393 TIMERR08 |= 0x80;
394}
395
361#endif 396#endif
362 397
363int tick_add_task(void (*f)(void)) 398int tick_add_task(void (*f)(void))