File tree 1 file changed +8
-7
lines changed
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(){
94
94
static uint16_t steps [17 ];
95
95
static uint32_t masks [17 ];
96
96
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 ;
99
101
current_step ++ ;
100
- timer1_write (pwm_steps [current_step ] * pwm_multiplier );
101
102
} else {
102
-
103
103
current_step = 0 ;
104
104
stepcount = 0 ;
105
105
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 ;
109
110
stepcount = pwm_steps_len ;
110
111
memcpy (steps , pwm_steps , (stepcount + 1 ) * 2 );
111
112
memcpy (masks , pwm_steps_mask , stepcount * 4 );
You can’t perform that action at this time.
0 commit comments