projects
/
rpikern
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
574147e
)
initialize timer
author
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 15 Nov 2020 07:26:55 +0000
(09:26 +0200)
committer
John Tsiombikas
<nuclear@member.fsf.org>
Sun, 15 Nov 2020 07:26:55 +0000
(09:26 +0200)
src/timer.c
patch
|
blob
|
history
diff --git
a/src/timer.c
b/src/timer.c
index
7df21bb
..
cbcebee
100644
(file)
--- a/
src/timer.c
+++ b/
src/timer.c
@@
-6,5
+6,10
@@
volatile unsigned long num_ticks;
void timer_init(void)
{
+ /* clear all 4 timer interrupt bits */
+ STM_CTL_REG = 0xf;
+ /* setup first timer interrupt */
+ STM_CMP1_REG = STM_LCNT_REG + 4000;
+
enable_gpu_irq(IRQ_GPU_TIMER1);
}