From 067cca7baaee0bff00e318e1ad61feb355c6096a Mon Sep 17 00:00:00 2001
From: Zach Eveland <zeveland@blacklabel-development.com>
Date: Wed, 14 Mar 2012 18:17:22 -0400
Subject: [PATCH] reduced delay before starting the Leonardo bootloader

Since we use a magic RAM flag to signal to the bootloader there's a risk of the sketch overwriting the magic RAM location before the bootloader starts.  By reducing the watchdog timeout we reduce the chance of this happening.
---
 hardware/arduino/cores/arduino/CDC.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/hardware/arduino/cores/arduino/CDC.cpp b/hardware/arduino/cores/arduino/CDC.cpp
index 94faf2e73..7206aa61d 100644
--- a/hardware/arduino/cores/arduino/CDC.cpp
+++ b/hardware/arduino/cores/arduino/CDC.cpp
@@ -111,7 +111,7 @@ bool WEAK CDC_Setup(Setup& setup)
 				// Serial1.print(">"); Serial1.println(_usbLineInfo.lineState, HEX);
 				if ((_usbLineInfo.lineState & 0x01) == 0) {
 					*(uint16_t *)0x0A00 = 0x7777;
-					wdt_enable(WDTO_250MS);
+					wdt_enable(WDTO_120MS);
 				} else {
 					// Most OSs do some intermediate steps when configuring ports and DTR can
 					// twiggle more than once before stabilizing.