direwolf
direwolf copied to clipboard
Added handling of serial port DCB for Windows
fixes #315
On Windows systems, it seems to depend on the driver resp. serial port hardware if a simple call of EscapeCommFunction()
is enough. If the fDtrControl or fRtsControl in the DCB is in the wrong state, it may fail to set it as desired.
see https://docs.microsoft.com/en-us/windows/win32/api/winbase/ns-winbase-dcb#members
Furthermore, I've tried to simplify the Linux version which allows to directly set/clear the bits with the ioctl()
function, according to https://linux.die.net/man/4/tty_ioctl