1
0
mirror of https://github.com/arduino/Arduino.git synced 2024-12-01 12:24:14 +01:00

Workaround for spurious port opening after upload (Arduino Due)

This commit is contained in:
Cristian Maglie 2012-09-25 19:50:35 +02:00
parent 69fb711b49
commit e7141291a5

View File

@ -252,6 +252,10 @@ size_t Serial_::write(uint8_t c) {
// where the port is configured (lineState != 0) but not quite opened.
Serial_::operator bool()
{
// this is here to avoid spurious opening after upload
if (millis() < 500)
return false;
bool result = false;
if (_usbLineInfo.lineState > 0)