Due to a bad Leonardo Bootloader this is the only way (i know) to fix this bug right now. It no longer needs to be included in the sketch anymore, this will be compiled automatically now.
11 lines
No EOL
346 B
C++
11 lines
No EOL
346 B
C++
#include <Arduino.h>
|
|
#include <pins_arduino.h>
|
|
|
|
// workaround for undefined USBCON has to be placed in every sketch
|
|
// otherwise the timings wont work correctly
|
|
// this is only needed for Leonardo/Micro boards and not for HoodLoader2
|
|
// due to a better bootloader reset (usb clock does not run after programming)
|
|
ISR(USB_GEN_vect)
|
|
{
|
|
UDINT = 0;
|
|
} |