projects
/
my-code
/
arm.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
bullshit commit, sync for travel (to zn00H!) :)
[my-code/arm.git]
/
betty
/
interrupts.c
diff --git
a/betty/interrupts.c
b/betty/interrupts.c
index
ed33c15
..
7d319db
100644
(file)
--- a/
betty/interrupts.c
+++ b/
betty/interrupts.c
@@
-158,11
+158,13
@@
void interrupt_tc_config(u8 tcnum,u8 mode,u8 cap,u32 psv) {
if(tcnum==0) {
T0TCR=0x03;
if(tcnum==0) {
T0TCR=0x03;
+ T0TC=0;
T0CTCR=mode|(cap<<2);
T0PR=psv;
}
else {
T1TCR=0x03;
T0CTCR=mode|(cap<<2);
T0PR=psv;
}
else {
T1TCR=0x03;
+ T1TC=0;
T1CTCR=mode|(cap<<2);
T1PR=psv;
}
T1CTCR=mode|(cap<<2);
T1PR=psv;
}
@@
-209,14
+211,21
@@
void interrupt_tc_ir_set(u8 tcnum,u8 tcmc) {
if(tcnum>1)
return;
if(tcnum>1)
return;
- if(tcnum==0)
{
+ if(tcnum==0)
T0IR=tcmc;
T0IR=tcmc;
- T0TCR=0x01;
- }
- else {
+ else
T1IR=tcmc;
T1IR=tcmc;
+}
+
+void interrupt_tc_enable(u8 tcnum) {
+
+ if(tcnum>1)
+ return;
+
+ if(tcnum==0)
+ T0TCR=0x01;
+ else
T1TCR=0x01;
T1TCR=0x01;
- }
}
// pwm interrupts
}
// pwm interrupts