mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-26 07:02:15 +03:00
disable all interrupts when reading from spiffs
this fixes any possible resets caused by interrupt routines trying to read the flash while there is an ongoing spiffs operation
This commit is contained in:
@ -135,7 +135,7 @@ void ets_intr_unlock();
|
||||
extern uint32_t interruptsState;
|
||||
|
||||
#define interrupts() xt_enable_interrupts(interruptsState)
|
||||
#define noInterrupts() xt_disable_interrupts(interruptsState, 15)
|
||||
#define noInterrupts() __asm__ __volatile__("rsil %0,15; esync; isync; dsync" : "=a" (interruptsState))
|
||||
|
||||
#define clockCyclesPerMicrosecond() ( F_CPU / 1000000L )
|
||||
#define clockCyclesToMicroseconds(a) ( (a) / clockCyclesPerMicrosecond() )
|
||||
|
Reference in New Issue
Block a user