From c57d028c038f19463259059026fbf4e4e1f25335 Mon Sep 17 00:00:00 2001 From: Lars-Dominik Braun Date: Tue, 9 Jun 2015 14:30:15 +0200 Subject: pwm: Switch to fast mode before enabling speaker --- pwm.c | 6 +++--- 1 file 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 () { -- cgit v1.2.3