| #endif | #endif | ||||
| } | } | ||||
| #ifndef WDFR | |||||
| #define WDFR 3 | |||||
| #endif | |||||
| void _reboot_Teensyduino_(void) | void _reboot_Teensyduino_(void) | ||||
| { | { | ||||
| cli(); | cli(); | ||||
| // stop watchdog timer, if running | |||||
| MCUSR &= ~(1<<WDFR); | |||||
| WDTCSR |= (1<<WDCE); | |||||
| WDTCSR = 0; | |||||
| delayMicroseconds(5000); | delayMicroseconds(5000); | ||||
| UDCON = 1; | UDCON = 1; | ||||
| USBCON = (1<<FRZCLK); | USBCON = (1<<FRZCLK); |