diff --git a/README.md b/README.md index 5410197..b7479ee 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,8 @@ This assumes you have everything on your system necessary to compile ANY native #### Windows: - * Windows 7 or Windows 8.1 are supported. + * Windows 7, Windows 8.1, and Windows 10 are supported. + * Might just download and install with no extra steps. If the downloaded binary fails you'll have to build it with the following steps. * Install [Visual Studio Express 2013 for Windows Desktop](http://www.microsoft.com/visualstudio/eng/2013-downloads#d-2013-express). * If you are hacking on an Arduino, be sure to install [the drivers](http://arduino.cc/en/Guide/windows#toc4). * Install [node.js](http://nodejs.org/) matching the bitness (32 or 64) of your operating system. diff --git a/src/serialport_win.cpp b/src/serialport_win.cpp index 3ea13e5..b992441 100644 --- a/src/serialport_win.cpp +++ b/src/serialport_win.cpp @@ -80,13 +80,22 @@ void EIO_Open(uv_work_t* req) { DCB dcb = { 0 }; dcb.DCBlength = sizeof(DCB); - if(data->hupcl == false) + if(data->hupcl == false) { dcb.fDtrControl = DTR_CONTROL_DISABLE; // disable DTR to avoid reset - if(!BuildCommDCB("9600,n,8,1", &dcb)) { - ErrorCodeToString("BuildCommDCB", GetLastError(), data->errorString); - return; + } else { + dcb.fDtrControl = DTR_CONTROL_ENABLE; } + dcb.BaudRate = CBR_9600; + dcb.Parity = NOPARITY; + dcb.ByteSize = 8; + dcb.StopBits = ONESTOPBIT; + dcb.fInX = FALSE; + dcb.fOutX = FALSE; + dcb.fOutxDsrFlow = FALSE; + dcb.fOutxCtsFlow = FALSE; + dcb.fRtsControl = RTS_CONTROL_ENABLE; + dcb.fBinary = true; dcb.BaudRate = data->baudRate; dcb.ByteSize = data->dataBits;