Error in Samd21_host.c


In cores/arduino/USB/samd21_host.c line 148 inside UHD_Init()

// Put VBUS on USB port
digitalWrite( PIN_USB_HOST_ENABLE, HIGH );

The USB host enable pin is attached to the gate of a p-fet and should be OUTPUT LOW to put 5V on the USB VBUS. By rights, there is no need for a dedicated pin to drive the fet at all. That is what a micro-USB-A cable or OTG adapter is for, to connect the ID pin to GND. Leaving PIN_USB_HOST_ENABLE as INPUT LOW works just fine. Waste of a pin; it appears to do nothing.

Set to OUTPUT HIGH the pin is sweating 10mA across a 330 ohm resistor to gnd, for nothing.