Merge pull request #394 from hharte/fixserial

Windows: Support serial ports > COM9
This commit is contained in:
David Given
2021-12-17 23:06:41 +00:00
committed by GitHub

View File

@@ -18,8 +18,9 @@
public:
SerialPortImpl(const std::string& name)
{
std::string dos_name = "\\\\.\\" + name;
_handle = CreateFileA(
name.c_str(),
dos_name.c_str(),
/* dwDesiredAccess= */ GENERIC_READ|GENERIC_WRITE,
/* dwShareMode= */ 0,
/* lpSecurityAttribues= */ nullptr,