File tree 2 files changed +2
-29
lines changed
2 files changed +2
-29
lines changed Original file line number Diff line number Diff line change @@ -146,16 +146,6 @@ void ets_intr_unlock();
146
146
#define __STRINGIFY (a ) #a
147
147
#endif
148
148
149
- #if CORE_MOCK
150
-
151
- #define xt_rsil (level ) (level)
152
- #define xt_wsr_ps (state ) do { (void )(state); } while (0 )
153
-
154
- #define interrupts () do { (void )0 ; } while (0 )
155
- #define noInterrupts () do { (void )0 ; } while (0 )
156
-
157
- #else // !CORE_MOCK
158
-
159
149
// these low level routines provide a replacement for SREG interrupt save that AVR uses
160
150
// but are esp8266 specific. A normal use pattern is like
161
151
//
@@ -175,8 +165,6 @@ void ets_intr_unlock();
175
165
#define interrupts () xt_rsil(0 )
176
166
#define noInterrupts () xt_rsil(15 )
177
167
178
- #endif // !CORE_MOCK
179
-
180
168
#define clockCyclesPerMicrosecond () ( F_CPU / 1000000L )
181
169
#define clockCyclesToMicroseconds (a ) ( (a) / clockCyclesPerMicrosecond() )
182
170
#define microsecondsToClockCycles (a ) ( (a) * clockCyclesPerMicrosecond () )
Original file line number Diff line number Diff line change @@ -143,26 +143,11 @@ extern "C" {
143
143
#define __STRINGIFY (a ) #a
144
144
#endif
145
145
146
- // these low level routines provide a replacement for SREG interrupt save that AVR uses
147
- // but are esp8266 specific. A normal use pattern is like
148
- //
149
- // {
150
- // uint32_t savedPS = xt_rsil(1); // this routine will allow level 2 and above
151
- // // do work here
152
- // xt_wsr_ps(savedPS); // restore the state
153
- // }
154
- //
155
- // level (0-15), interrupts of the given level and above will be active
156
- // level 15 will disable ALL interrupts,
157
- // level 0 will enable ALL interrupts,
158
- //
159
- #define xt_rsil (level ) (__extension__({uint32_t state; __asm__ __volatile__ (" rsil %0," __STRINGIFY (level) : " =a" (state)); state;}))
160
- #define xt_wsr_ps (state ) __asm__ __volatile__ (" wsr %0,ps; isync" :: " a" (state) : "memory")
161
-
146
+ #define xt_rsil (level ) (level)
147
+ #define xt_wsr_ps (state ) do { (void )(state); } while (0 )
162
148
#define interrupts () xt_rsil(0 )
163
149
#define noInterrupts () xt_rsil(15 )
164
150
165
-
166
151
#define clockCyclesPerMicrosecond () ( F_CPU / 1000000L )
167
152
#define clockCyclesToMicroseconds (a ) ( (a) / clockCyclesPerMicrosecond() )
168
153
#define microsecondsToClockCycles (a ) ( (a) * clockCyclesPerMicrosecond () )
You can’t perform that action at this time.
0 commit comments