arduino-libraries / ArduinoLowPower

Powersave features for SAMD boards
GNU Lesser General Public License v2.1
81 stars 57 forks source link

Add support for boards with different name of serial USB connection #6

Closed stlehmann closed 5 years ago

stlehmann commented 5 years ago

I discovered that I couldn't use this library for the Adafruit Feather M0 which is a SAMD21 board. The reason was that the USB connection is named Serial1 and not SerialUSB as for the Arduino Zero. I figured it would be best to use the SERIAL_PORT_USBVIRTUAL define that is set in the board files. This way the library automatically uses the correct port.