File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
hardware/esp8266com/esp8266/cores/esp8266 Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -143,13 +143,13 @@ void ets_intr_unlock();
143
143
// level 15 will disable ALL interrupts,
144
144
// level 0 will disable most software interrupts
145
145
//
146
- #define xt_disable_interrupts (state , level ) __asm__ __volatile__("rsil %0," __STRINGIFY(level) "; esync; isync; dsync" : "=a" (state))
147
- #define xt_enable_interrupts (state ) __asm__ __volatile__("wsr %0,ps; esync " :: "a" (state) : "memory")
146
+ #define xt_disable_interrupts (state , level ) __asm__ __volatile__("rsil %0," __STRINGIFY(level) : "=a" (state))
147
+ #define xt_enable_interrupts (state ) __asm__ __volatile__("wsr %0,ps; isync " :: "a" (state) : "memory")
148
148
149
149
extern uint32_t interruptsState ;
150
150
151
151
#define interrupts () xt_enable_interrupts(interruptsState)
152
- #define noInterrupts () __asm__ __volatile__("rsil %0,15; esync; isync; dsync " : "=a" (interruptsState))
152
+ #define noInterrupts () __asm__ __volatile__("rsil %0,15" : "=a" (interruptsState))
153
153
154
154
#define clockCyclesPerMicrosecond () ( F_CPU / 1000000L )
155
155
#define clockCyclesToMicroseconds (a ) ( (a) / clockCyclesPerMicrosecond() )
Original file line number Diff line number Diff line change @@ -113,7 +113,7 @@ class EspClass {
113
113
uint32_t EspClass::getCycleCount ()
114
114
{
115
115
uint32_t ccount;
116
- __asm__ __volatile__ (" rsr %0,ccount" :" =a" (ccount));
116
+ __asm__ __volatile__ (" esync; rsr %0,ccount" :" =a" (ccount));
117
117
return ccount;
118
118
}
119
119
You can’t perform that action at this time.
0 commit comments