Fix PWM init bug, set all initial duty to 0.

This commit is contained in:
vowstar 2015-05-01 18:35:30 +08:00 committed by Orgmar
parent 4b4f600038
commit 32e9ac204a
1 changed files with 1 additions and 1 deletions

View File

@ -365,7 +365,7 @@ pwm_init(uint16 freq, uint16 *duty)
for (i = 0; i < PWM_CHANNEL; i++) {
// pwm_gpio |= (1 << pwm_out_io_num[i]);
pwm_gpio = 0;
pwm.duty[0] = 0;
pwm.duty[i] = 0;
}
pwm_set_freq(500, 0);