1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-22 21:23:07 +03:00

fix pwm first step getting skipped

This commit is contained in:
Me No Dev 2016-01-09 00:12:36 +02:00
parent 897a475fdb
commit 1d2237bc9d

View File

@ -103,7 +103,7 @@ void ICACHE_RAM_ATTR pwm_timer_isr(){
current_step = 0; current_step = 0;
stepcount = 0; stepcount = 0;
if(pwm_mask == 0) return; if(pwm_mask == 0) return;
T1L = (pwm_steps[current_step+1] * pwm_multiplier); T1L = (pwm_steps[current_step] * pwm_multiplier);
TEIE |= TEIE1; TEIE |= TEIE1;
if(pwm_mask & 0xFFFF) GPOS = pwm_mask & 0xFFFF; if(pwm_mask & 0xFFFF) GPOS = pwm_mask & 0xFFFF;
if(pwm_mask & 0x10000) GP16O = 1; if(pwm_mask & 0x10000) GP16O = 1;