Force baud rate to 9600 to finally really deal with bad Silicon Labs driver
authorarthur <arthur@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Thu, 25 Aug 2011 19:26:32 +0000 (19:26 +0000)
committerarthur <arthur@2c67d6c2-4361-4cd7-bd83-1149b1926c9b>
Thu, 25 Aug 2011 19:26:32 +0000 (19:26 +0000)
git-svn-id: https://valelab.ucsf.edu/svn/3rdpartypublic@80 2c67d6c2-4361-4cd7-bd83-1149b1926c9b

boost/boost/asio/detail/impl/win_iocp_serial_port_service.ipp

index 979895a..8f1f39f 100644 (file)
@@ -92,6 +92,10 @@ boost::system::error_code win_iocp_serial_port_service::open(
     dcb.XoffLim = 512;   \r
   // Note that the above did not fix the issue, the following does:\r
   dcb.ByteSize = 8;\r
+  // Some versions of the Silcon Labs driver can not deal with the default BaudRate\r
+  // Force it to a reasonable value\r
+  dcb.BaudRate = CBR_9600;\r
+\r
   if (!::SetCommState(handle, &dcb))\r
   {\r
     DWORD last_error = ::GetLastError();\r