From 49f7fb00fd7578fe5ecd78d60165fc2570aec1e2 Mon Sep 17 00:00:00 2001 From: Zach Eveland Date: Wed, 11 Apr 2012 23:19:05 -0400 Subject: fixed logic bug in Caterina that could stop the bootloader from entering self-programming mode --- cores/arduino/CDC.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cores/arduino/CDC.cpp') diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index c1e646d..1ee3a48 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -108,9 +108,8 @@ bool WEAK CDC_Setup(Setup& setup) // like servicing endpoints before the sketch ends if (1200 == _usbLineInfo.dwDTERate) { // We check DTR state to determine if host port is open (bit 0 of lineState). - // Serial1.print(">"); Serial1.println(_usbLineInfo.lineState, HEX); if ((_usbLineInfo.lineState & 0x01) == 0) { - *(uint16_t *)0x0A00 = 0x7777; + *(uint16_t *)0x0800 = 0x7777; wdt_enable(WDTO_120MS); } else { // Most OSs do some intermediate steps when configuring ports and DTR can @@ -120,7 +119,7 @@ bool WEAK CDC_Setup(Setup& setup) wdt_disable(); wdt_reset(); - *(uint16_t *)0x0A00 = 0x0; + *(uint16_t *)0x0800 = 0x0; } } return true; -- cgit v1.2.3-18-g5258