You've already forked ArduinoLowPower
							
							
				mirror of
				https://github.com/arduino-libraries/ArduinoLowPower.git
				synced 2025-10-30 19:45:35 +03:00 
			
		
		
		
	Add support for boards with different name of serial USB connection (#6)
* Replace SerialUSB by SERIAL_PORT_USBVIRTUAL Support boards where USB serial is named differently. E.g. the Adafruit Feather M0 uses Serial1 as name for serial USB port.
This commit is contained in:
		
				
					committed by
					
						 Martino Facchin
						Martino Facchin
					
				
			
			
				
	
			
			
			
						parent
						
							5399b36207
						
					
				
				
					commit
					b38a5bc50c
				
			| @@ -17,7 +17,7 @@ void ArduinoLowPowerClass::idle(uint32_t millis) { | |||||||
|  |  | ||||||
| void ArduinoLowPowerClass::sleep() { | void ArduinoLowPowerClass::sleep() { | ||||||
| 	bool restoreUSBDevice = false; | 	bool restoreUSBDevice = false; | ||||||
| 	if (SerialUSB) { | 	if (SERIAL_PORT_USBVIRTUAL) { | ||||||
| 		USBDevice.standby(); | 		USBDevice.standby(); | ||||||
| 	} else { | 	} else { | ||||||
| 		USBDevice.detach(); | 		USBDevice.detach(); | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user