New answers tagged


I imagine (haven't really tried it) this would work, with some minor adaptation to match your code structure. // VBUS or counting frames // Any frame counting? u8 USBConnected() { u8 f = UDFNUML; delay(3); return f != UDFNUML; } The method reads the UDFNUML - usb data frame number lower (byte) register, waits 3 milliseconds, which would be ...

Top 50 recent answers are included