File tree 1 file changed +4
-3
lines changed
1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change 38
38
*/
39
39
40
40
#include <Arduino.h>
41
+ #include "ets_sys.h"
41
42
#include "core_esp8266_waveform.h"
42
43
43
44
// Need speed, not size, here
@@ -130,15 +131,15 @@ static uint32_t lastCycleCount = 0; // Last ESP cycle counter on running the int
130
131
131
132
static void initTimer () {
132
133
timer1_disable ();
133
- timer1_isr_init ( );
134
- timer1_attachInterrupt (timer1Interrupt );
134
+ ETS_FRC_TIMER1_INTR_ATTACH ( NULL , NULL );
135
+ ETS_FRC_TIMER1_NMI_INTR_ATTACH (timer1Interrupt );
135
136
lastCycleCount = GetCycleCount ();
136
137
timer1_enable (TIM_DIV1 , TIM_EDGE , TIM_SINGLE );
137
138
timerRunning = true;
138
139
}
139
140
140
141
static void ICACHE_RAM_ATTR deinitTimer () {
141
- timer1_attachInterrupt (NULL );
142
+ ETS_FRC_TIMER1_NMI_INTR_ATTACH (NULL );
142
143
timer1_disable ();
143
144
timer1_isr_init ();
144
145
timerRunning = false;
You can’t perform that action at this time.
0 commit comments