diff options
author | Scott Allen <saydisp-git@yahoo.ca> | 2017-03-10 16:18:20 -0500 |
---|---|---|
committer | Martino Facchin <m.facchin@arduino.cc> | 2017-11-13 17:38:02 +0100 |
commit | 31223160ebfeb6aef21dded0572003eedb2b8fd1 (patch) | |
tree | 38e796ad948e5fd2dc79f4d7e9fe5253e3e6c5bd /cores/arduino/CDC.cpp | |
parent | 10e0811c520666bb7a4882651f13e8349aba717d (diff) |
Don't use line coding to trigger USB auto-reset
An auto-reset invoked using USB CDC is triggered by the port closing
(when set to 1200 baud). Closing of the port is indicated by DTR going inactive.
There is no need to have auto-reset invoked by a CDC_SET_LINE_CODING command.
Only the CDC_SET_CONTROL_LINE_STATE command, which indicates a change in the
state of DTR, should be used.
Diffstat (limited to 'cores/arduino/CDC.cpp')
-rw-r--r-- | cores/arduino/CDC.cpp | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index 125dc85..39373f6 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -94,10 +94,7 @@ bool CDC_Setup(USBSetup& setup) if (CDC_SET_CONTROL_LINE_STATE == r) { _usbLineInfo.lineState = setup.wValueL; - } - if (CDC_SET_LINE_CODING == r || CDC_SET_CONTROL_LINE_STATE == r) - { // auto-reset into the bootloader is triggered when the port, already // open at 1200 bps, is closed. this is the signal to start the watchdog // with a relatively long period so it can finish housekeeping tasks |