diff options
author | Max Christian Pohle | 2015-07-27 15:12:22 +0200 |
---|---|---|
committer | Max Christian Pohle | 2015-07-27 15:12:22 +0200 |
commit | 2df2697107d7873232c31a25a6947711b0903edb (patch) | |
tree | ff7247e9e970c69f3d3385950b19db9997a511b8 /src/inc/pwm | |
download | alarmclock-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')
-rwxr-xr-x | src/inc/pwm/pwm.c | 13 | ||||
-rwxr-xr-x | src/inc/pwm/pwm.h | 3 |
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 | |||
2 | void pwminit() | ||
3 | { | ||
4 | TCCR0 |= (1<<WGM01); | ||
5 | } | ||
6 | |||
7 | void 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 | |||
3 | void pwminit(); | ||