summaryrefslogtreecommitdiff
path: root/firmware/test/kernel
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-05-05 17:49:25 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-05-05 17:49:25 +0000
commit324cfa4f95d08ea6a332714bd395c05ee3ed7b6b (patch)
tree906bb3cb1dc31b998ddbd128c8d068305940660c /firmware/test/kernel
parent75e8cbbdcc3e25a73baf8febc08c5f3b1c716f44 (diff)
downloadrockbox-324cfa4f95d08ea6a332714bd395c05ee3ed7b6b.zip
rockbox-324cfa4f95d08ea6a332714bd395c05ee3ed7b6b.tar.gz
rockbox-324cfa4f95d08ea6a332714bd395c05ee3ed7b6b.tar.bz2
rockbox-324cfa4f95d08ea6a332714bd395c05ee3ed7b6b.tar.xz
*** empty log message ***
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@446 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/test/kernel')
-rw-r--r--firmware/test/kernel/timer.c64
1 files changed, 0 insertions, 64 deletions
diff --git a/firmware/test/kernel/timer.c b/firmware/test/kernel/timer.c
deleted file mode 100644
index a0d180a..0000000
--- a/firmware/test/kernel/timer.c
+++ /dev/null
@@ -1,64 +0,0 @@
-/***************************************************************************
- * __________ __ ___.
- * Open \______ \ ____ ____ | | _\_ |__ _______ ___
- * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
- * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
- * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
- * \/ \/ \/ \/ \/
- * $Id$
- *
- * Copyright (C) 2002 by Linus Nielsen Feltzing
- *
- * All files in this archive are subject to the GNU General Public License.
- * See the file COPYING in the source tree root for full license agreement.
- *
- * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
- * KIND, either express or implied.
- *
- ****************************************************************************/
-#include "sh7034.h"
-#include "system.h"
-#include "debug.h"
-#include "kernel.h"
-
-void tick_start(unsigned int interval_in_ms)
-{
- unsigned int count;
-
- count = FREQ / 1000 / 8 * interval_in_ms;
-
- debugf("count = %d\n", count);
- if(count > 0xffff)
- {
- debugf("Error! The tick interval is too long (%d ms)\n",
- interval_in_ms);
- return;
- }
-
- /* We are using timer 0 */
-
- TSTR &= ~0x01; /* Stop the timer */
- TSNC &= ~0x01; /* No synchronization */
- TMDR &= ~0x01; /* Operate normally */
-
- TCNT0 = 0; /* Start counting at 0 */
- GRA0 = count;
- TCR0 = 0x23; /* Clear at GRA match, sysclock/8 */
-
- /* Enable interrupt on level 1 */
- IPRC = (IPRC & ~0x00f0) | 0x0010;
-
- TSR0 &= ~0x01;
- TIER0 = 0xf9; /* Enable GRA match interrupt */
-
- TSTR |= 0x01; /* Start timer 1 */
-}
-
-#pragma interrupt
-void IMIA0(void)
-{
- current_tick++;
-
-// debugf("t\n");
- TSR0 &= ~0x01;
-}