mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Merge pull request #749 from p-j-b/fix-hang-windows-adafruit-floppy-greaseweazle
Set DTR after calling SetCommState
This commit is contained in:
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user