aboutsummaryrefslogtreecommitdiff
path: root/src/inc/pwm
diff options
context:
space:
mode:
Diffstat (limited to 'src/inc/pwm')
-rwxr-xr-xsrc/inc/pwm/pwm.c13
-rwxr-xr-xsrc/inc/pwm/pwm.h3
2 files changed, 16 insertions, 0 deletions
diff --git a/src/inc/pwm/pwm.c b/src/inc/pwm/pwm.c
new file mode 100755
index 0000000..fac9347
--- /dev/null
+++ b/src/inc/pwm/pwm.c
@@ -0,0 +1,13 @@
1
2void pwminit()
3{
4 TCCR0 |= (1<<WGM01);
5}
6
7void pwm_setInterval()
8{
9 /// if(t_current.ms <= 500)
10 /// { OCR1A = 50 + (200 - (t_current.ms / 3)); }
11 /// else
12 /// { OCR1A = 50 + (200 - ((1000 - t_current.ms) / 3)); }
13}
diff --git a/src/inc/pwm/pwm.h b/src/inc/pwm/pwm.h
new file mode 100755
index 0000000..8b671bc
--- /dev/null
+++ b/src/inc/pwm/pwm.h
@@ -0,0 +1,3 @@
1#include <avr/io.h>
2
3void pwminit();
..