mirror of
				https://github.com/esphome/esphome.git
				synced 2025-11-04 09:01:49 +00:00 
			
		
		
		
	Restore InterruptLock on wifi-less ESP8266 (#2712)
This commit is contained in:
		
				
					committed by
					
						
						Jesse Hills
					
				
			
			
				
	
			
			
			
						parent
						
							87e1cdeedb
						
					
				
				
					commit
					ab506b09fe
				
			@@ -9,6 +9,7 @@
 | 
				
			|||||||
#ifdef USE_WIFI
 | 
					#ifdef USE_WIFI
 | 
				
			||||||
#include <ESP8266WiFi.h>
 | 
					#include <ESP8266WiFi.h>
 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
 | 
					#include <Arduino.h>
 | 
				
			||||||
#include <osapi.h>
 | 
					#include <osapi.h>
 | 
				
			||||||
#elif defined(USE_ESP32_FRAMEWORK_ARDUINO)
 | 
					#elif defined(USE_ESP32_FRAMEWORK_ARDUINO)
 | 
				
			||||||
#include <Esp.h>
 | 
					#include <Esp.h>
 | 
				
			||||||
@@ -430,13 +431,8 @@ void hsv_to_rgb(int hue, float saturation, float value, float &red, float &green
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#ifdef USE_ESP8266
 | 
					#ifdef USE_ESP8266
 | 
				
			||||||
#ifdef USE_WIFI
 | 
					 | 
				
			||||||
IRAM_ATTR InterruptLock::InterruptLock() { xt_state_ = xt_rsil(15); }
 | 
					IRAM_ATTR InterruptLock::InterruptLock() { xt_state_ = xt_rsil(15); }
 | 
				
			||||||
IRAM_ATTR InterruptLock::~InterruptLock() { xt_wsr_ps(xt_state_); }
 | 
					IRAM_ATTR InterruptLock::~InterruptLock() { xt_wsr_ps(xt_state_); }
 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
IRAM_ATTR InterruptLock::InterruptLock() {}
 | 
					 | 
				
			||||||
IRAM_ATTR InterruptLock::~InterruptLock() {}
 | 
					 | 
				
			||||||
#endif
 | 
					 | 
				
			||||||
#endif
 | 
					#endif
 | 
				
			||||||
#ifdef USE_ESP32
 | 
					#ifdef USE_ESP32
 | 
				
			||||||
IRAM_ATTR InterruptLock::InterruptLock() { portDISABLE_INTERRUPTS(); }
 | 
					IRAM_ATTR InterruptLock::InterruptLock() { portDISABLE_INTERRUPTS(); }
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user