mirror of
https://github.com/arduino/Arduino.git
synced 2024-12-02 13:24:12 +01:00
changed auto-reset method for upload: now triggered by opening port at 1200 bps
This commit is contained in:
parent
dd539bacf8
commit
ff5fe87864
@ -3,7 +3,7 @@
|
||||
leonardo.name=Arduino Leonardo
|
||||
leonardo.upload.protocol=stk500
|
||||
leonardo.upload.maximum_size=30720
|
||||
leonardo.upload.speed=115200
|
||||
leonardo.upload.speed=1200
|
||||
leonardo.bootloader.low_fuses=0xde
|
||||
leonardo.bootloader.high_fuses=0xd8
|
||||
leonardo.bootloader.extended_fuses=0xf3
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user