aboutsummaryrefslogtreecommitdiff
path: root/cores/arduino/CDC.cpp
diff options
context:
space:
mode:
authorZach Eveland <zeveland@blacklabel-development.com>2012-04-11 23:19:05 -0400
committerZach Eveland <zeveland@blacklabel-development.com>2012-04-11 23:19:05 -0400
commit49f7fb00fd7578fe5ecd78d60165fc2570aec1e2 (patch)
tree15e99d9ddbf1104db3e7f26e29f4de2e13134c61 /cores/arduino/CDC.cpp
parente2e0260094c762fddf4669b7a957914405ae9f19 (diff)
fixed logic bug in Caterina that could stop the bootloader from entering self-programming mode
Diffstat (limited to 'cores/arduino/CDC.cpp')
-rw-r--r--cores/arduino/CDC.cpp5
1 files changed, 2 insertions, 3 deletions
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;