aboutsummaryrefslogtreecommitdiff
path: root/src/inc/pwm/pwm.c
diff options
context:
space:
mode:
authorMax Christian Pohle2015-07-27 15:12:22 +0200
committerMax Christian Pohle2015-07-27 15:12:22 +0200
commit2df2697107d7873232c31a25a6947711b0903edb (patch)
treeff7247e9e970c69f3d3385950b19db9997a511b8 /src/inc/pwm/pwm.c
downloadalarmclock-2df2697107d7873232c31a25a6947711b0903edb.tar.bz2
alarmclock-2df2697107d7873232c31a25a6947711b0903edb.zip
latest running version from march 2011, not having been in repo before,
dcf77 working, mp3 playback and two display types are supported
Diffstat (limited to 'src/inc/pwm/pwm.c')
-rwxr-xr-xsrc/inc/pwm/pwm.c13
1 files changed, 13 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}
..