diff options
| author | Zach Eveland <zeveland@blacklabel-development.com> | 2011-08-24 17:12:28 -0400 | 
|---|---|---|
| committer | Zach Eveland <zeveland@blacklabel-development.com> | 2011-08-24 17:12:28 -0400 | 
| commit | 160bf890e0cc96a7be4166eca7b9753d64635339 (patch) | |
| tree | 095dd76f9405500d740c824345fb4f0dc5f37d82 /cores/arduino | |
| parent | 0d592a5fea9b98585fd298e6515f406c9e3a8543 (diff) | |
changed auto-reset method for upload: now triggered by opening port at 1200 bps
Diffstat (limited to 'cores/arduino')
| -rw-r--r-- | cores/arduino/CDC.cpp | 6 | 
1 files changed, 3 insertions, 3 deletions
diff --git a/cores/arduino/CDC.cpp b/cores/arduino/CDC.cpp index b0e5e89..7d9d682 100644 --- a/cores/arduino/CDC.cpp +++ b/cores/arduino/CDC.cpp @@ -94,15 +94,15 @@ bool WEAK CDC_Setup(Setup& setup)  		if (CDC_SET_LINE_CODING == r)  		{  			USB_RecvControl((void*)&_usbLineInfo,7); +			if (1200 == _usbLineInfo.dwDTERate)		// auto-reset is triggered when avrdude opens the port at 1200 bps +				Reboot();							 +  			return true;  		}  		if (CDC_SET_CONTROL_LINE_STATE == r)  		{  			_usbLineInfo.lineState = setup.wValueL; -//			if (_usbLineInfo.dwDTERate == 115200 && _usbLineInfo.lineState == 0)	// Emulate DTR reset hack -			if (_usbLineInfo.lineState == 0) -				Reboot();  			return true;  		}  	}  | 
