1
0
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:
Zach Eveland 2011-08-24 17:12:28 -04:00
parent dd539bacf8
commit ff5fe87864
2 changed files with 4 additions and 4 deletions

View File

@ -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

View File

@ -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;
}
}