aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars-Dominik Braun <lars@6xq.net>2015-06-09 14:30:15 +0200
committerLars-Dominik Braun <lars@6xq.net>2015-06-09 14:30:15 +0200
commitc57d028c038f19463259059026fbf4e4e1f25335 (patch)
treed0e3869b582447fdc66b42729a4e00471008d685
parent3738d2a2f8716614115e31ab5758a8f84a417578 (diff)
downloadhourglass-c57d028c038f19463259059026fbf4e4e1f25335.tar.gz
hourglass-c57d028c038f19463259059026fbf4e4e1f25335.tar.bz2
hourglass-c57d028c038f19463259059026fbf4e4e1f25335.zip
pwm: Switch to fast mode before enabling speaker
-rw-r--r--pwm.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/pwm.c b/pwm.c
index 6990c0d..b2f592b 100644
--- a/pwm.c
+++ b/pwm.c
@@ -155,12 +155,12 @@ void pwmSetOff () {
}
void speakerStart (const speakerMode mode __unused__) {
- /* 12.8ms */
- speakerCount = 100;
+ enableFast ();
for (uint8_t i = 0; i < PWM_MAX_BRIGHTNESS; i += 2) {
pwmvalue[i][1] |= (1 << PD6);
}
- enableFast ();
+ /* 12.8ms */
+ speakerCount = 100;
}
void speakerInit () {