Skip to content

Commit b38a5bc

Browse files
stlehmannfacchinm
authored andcommitted
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.
1 parent 5399b36 commit b38a5bc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/samd/ArduinoLowPower.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ void ArduinoLowPowerClass::idle(uint32_t millis) {
1717

1818
void ArduinoLowPowerClass::sleep() {
1919
bool restoreUSBDevice = false;
20-
if (SerialUSB) {
20+
if (SERIAL_PORT_USBVIRTUAL) {
2121
USBDevice.standby();
2222
} else {
2323
USBDevice.detach();
@@ -100,4 +100,4 @@ void ArduinoLowPowerClass::attachInterruptWakeup(uint32_t pin, voidFuncPtr callb
100100

101101
ArduinoLowPowerClass LowPower;
102102

103-
#endif // ARDUINO_ARCH_SAMD
103+
#endif // ARDUINO_ARCH_SAMD

0 commit comments

Comments
 (0)