Open facchinm opened 5 years ago
I am testing code on a Adafruit Feather M0 (samd21) and these changes are working for me. Windows finds the "new" device with no problem. So far it has been the same comm port but I have to reconnect, as expected. Nice work!
This commit tries to solve https://github.com/arduino-libraries/ArduinoLowPower/issues/7 ; must be used in conjuction with https://github.com/arduino/ArduinoCore-samd/pull/361
Expected behaviour: the USB core is now totally disabled during standby (eg. it cannot receive a WAKEUP from the host PC). At every other kind of wakeup (RTC/gpio) the board re-enumerate itself, as if it was the first attach(). All OS should support this cleanly, however the port name could change or the serial monitor in use could not pick up the new board. All serial monitors should be closed and reopened after a successful resume.