aboutsummaryrefslogtreecommitdiff
path: root/src/timer.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/timer.c')
-rw-r--r--src/timer.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/src/timer.c b/src/timer.c
new file mode 100644
index 0000000..68c6c06
--- /dev/null
+++ b/src/timer.c
@@ -0,0 +1,26 @@
+#include "../timer.h"
+
+#ifdef CONFIG_IOE_TIMERS
+
+#ifdef COUNTER0_PWM
+ISR(TIMER0_OVF_vect, ISR_BLOCK) {
+ if (timer_0_pwm_overflow)
+ timer_0_pwm_overflow();
+}
+#endif /* COUNTER0_PWM */
+
+#ifdef COUNTER0_PWM
+ISR(TIMER1_OVF_vect, ISR_BLOCK) {
+ if (timer_1_16pwm_overflow)
+ timer_1_16pwm_overflow();
+}
+#endif /* COUNTER0_PWM */
+
+#ifdef COUNTER0_PWM
+ISR(TIMER2_OVF_vect, ISR_BLOCK) {
+ if (timer_2_pwm_overflow)
+ timer_2_pwm_overflow();
+}
+#endif /* COUNTER0_PWM */
+
+#endif /* CONFIG_IOE_TIMERS */