Merge pull request #749 from p-j-b/fix-hang-windows-adafruit-floppy-greaseweazle

Set DTR after calling SetCommState
This commit is contained in:
David Given
2024-05-01 12:46:08 +02:00
committed by GitHub

View File

@@ -97,6 +97,12 @@ public:
.Parity = NOPARITY,
.StopBits = ONESTOPBIT};
SetCommState(_handle, &dcb);
if (!EscapeCommFunction(_handle, CLRDTR))
error("Couldn't clear DTR: {}", get_last_error_string());
Sleep(200);
if (!EscapeCommFunction(_handle, SETDTR))
error("Couldn't set DTR: {}", get_last_error_string());
}
private: