aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr/main.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/usr/main.c b/usr/main.c
index 5a49f49..1743c33 100644
--- a/usr/main.c
+++ b/usr/main.c
@@ -66,7 +66,13 @@ void loop(void)
void loopt(void)
{
static char str[13];
+ static char cnt = 18;
draw_string(0, 14, ulong_to_string(*(volatile unsigned long*)SYS_TIMER_CHI, str));
+ cnt--;
+ if (cnt == 2)
+ unsubscribe_irq(SYS_TIMER_1_IRQ);
+ if (cnt == 0)
+ unsubscribe_irq(SYS_TIMER_0_IRQ);
}
static unsigned long TICK_RATE_0 = 5000000;