aboutsummaryrefslogtreecommitdiff
path: root/src/timer.c
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2015-10-17 15:40:51 +0200
committerKarel Kočí <cynerd@email.cz>2015-10-17 15:40:51 +0200
commitb0d8f22f3492fbb3f6dc0e8026e63c803af59007 (patch)
treeeb9707612e87856962474885f2a18ae1621d214e /src/timer.c
parent8fa9db4244f4ee33aa47561c569edfa62fe37928 (diff)
downloadavr-ioe-b0d8f22f3492fbb3f6dc0e8026e63c803af59007.tar.gz
avr-ioe-b0d8f22f3492fbb3f6dc0e8026e63c803af59007.tar.bz2
avr-ioe-b0d8f22f3492fbb3f6dc0e8026e63c803af59007.zip
Complete commit of current work
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 */