diff options
author | Marcoen Hirschberg <marcoen@gmail.com> | 2006-08-12 08:01:54 +0000 |
---|---|---|
committer | Marcoen Hirschberg <marcoen@gmail.com> | 2006-08-12 08:01:54 +0000 |
commit | dd754886f5fd4004b521c954e263772d35fb6a46 (patch) | |
tree | bcf072bd18da2c7d2b5aa0ebbb89a01a50354f23 /firmware/kernel.c | |
parent | e6ed58f6c545719ed804c9ad513496f8d0fa0286 (diff) | |
download | rockbox-dd754886f5fd4004b521c954e263772d35fb6a46.tar.gz rockbox-dd754886f5fd4004b521c954e263772d35fb6a46.zip |
update the gigabeat code and move to target_tree
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@10535 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/kernel.c')
-rw-r--r-- | firmware/kernel.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/firmware/kernel.c b/firmware/kernel.c index 979dbb4759..7c5c74c662 100644 --- a/firmware/kernel.c +++ b/firmware/kernel.c @@ -415,7 +415,31 @@ void tick_start(unsigned int interval_in_ms) TIMERR08 |= 0x80; } +#elif CONFIG_CPU == S3C2440 +void tick_start(unsigned int interval_in_ms) +{ + unsigned long count; + + /* period = (n + 1) / 128 , n = tick time count (1~127)*/ + count = interval_in_ms / 1000 * 128 - 1; + if(count > 127) + { + panicf("Error! The tick interval is too long (%d ms)\n", + interval_in_ms); + return; + } + + /* Disable the tick */ + TICNT &= ~(1<<7); + /* Set the count value */ + TICNT |= count; + /* Start up the ticker */ + TICNT |= (1<<7); + + /* need interrupt handler ??? */ + +} #endif int tick_add_task(void (*f)(void)) |