File tree Expand file tree Collapse file tree 1 file changed +8
-7
lines changed
Expand file tree Collapse file tree 1 file changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -94,18 +94,19 @@ void ICACHE_RAM_ATTR pwm_timer_isr(){
9494 static uint16_t steps [17 ];
9595 static uint32_t masks [17 ];
9696 if (current_step < stepcount ){
97- GPOC = masks [current_step ] & 0xFFFF ;
98- if (masks [current_step ] & 0x10000 ) GP16O &= ~1 ;
97+ T1L = (pwm_steps [current_step + 1 ] * pwm_multiplier );
98+ TEIE |= TEIE1 ;
99+ if (masks [current_step ] & 0xFFFF ) GPOC = masks [current_step ] & 0xFFFF ;
100+ if (masks [current_step ] & 0x10000 ) GP16O = 0 ;
99101 current_step ++ ;
100- timer1_write (pwm_steps [current_step ] * pwm_multiplier );
101102 } else {
102-
103103 current_step = 0 ;
104104 stepcount = 0 ;
105105 if (pwm_mask == 0 ) return ;
106- GPOS = pwm_mask & 0xFFFF ;
107- if (pwm_mask & 0x10000 ) GP16O |= 1 ;
108- timer1_write (pwm_steps [0 ] * pwm_multiplier );
106+ T1L = (pwm_steps [current_step + 1 ] * pwm_multiplier );
107+ TEIE |= TEIE1 ;
108+ if (pwm_mask & 0xFFFF ) GPOS = pwm_mask & 0xFFFF ;
109+ if (pwm_mask & 0x10000 ) GP16O = 1 ;
109110 stepcount = pwm_steps_len ;
110111 memcpy (steps , pwm_steps , (stepcount + 1 ) * 2 );
111112 memcpy (masks , pwm_steps_mask , stepcount * 4 );
You can’t perform that action at this time.
0 commit comments