mirror of
				https://github.com/esphome/esphome.git
				synced 2025-10-30 22:53:59 +00:00 
			
		
		
		
	Add workaround for crash in Arduino 2.0.9 when CDC is configured (#5987)
This commit is contained in:
		
				
					committed by
					
						 Jesse Hills
						Jesse Hills
					
				
			
			
				
	
			
			
			
						parent
						
							872519f7f6
						
					
				
				
					commit
					4f8e3211bf
				
			| @@ -285,6 +285,7 @@ void Logger::pre_setup() { | |||||||
| #if defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) | #if defined(USE_ESP32_VARIANT_ESP32S2) || defined(USE_ESP32_VARIANT_ESP32S3) | ||||||
| #if ARDUINO_USB_CDC_ON_BOOT | #if ARDUINO_USB_CDC_ON_BOOT | ||||||
|         this->hw_serial_ = &Serial; |         this->hw_serial_ = &Serial; | ||||||
|  |         Serial.setTxTimeoutMs(0);  // workaround for 2.0.9 crash when there's no data connection | ||||||
|         Serial.begin(this->baud_rate_); |         Serial.begin(this->baud_rate_); | ||||||
| #else | #else | ||||||
|         this->hw_serial_ = &Serial; |         this->hw_serial_ = &Serial; | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user