[commit] r2155 - Fix for max. number of serial ports.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[commit] r2155 - Fix for max. number of serial ports.

commits-3
 
Author: andreas
Date: 2010-03-11 11:11:11 -0800 (Thu, 11 Mar 2010)
New Revision: 2155

Modified:
   trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c
Log:
Fix for max. number of serial ports.

Modified: trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c
===================================================================
--- trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c 2010-03-11 17:00:34 UTC (rev 2154)
+++ trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c 2010-03-11 19:11:11 UTC (rev 2155)
@@ -21,7 +21,7 @@
 #endif
 
 /* Maximum number of serial ports supported */
-#define MAX_SERIAL_PORTS 16
+#define MAX_SERIAL_PORTS 256
 
 /* Size of the queues used by the driver */
 #define  IN_QUEUE_SIZE 4096
@@ -108,7 +108,7 @@
       success(false);
       return 0;
     }
-  wsprintf(name,TEXT("COM%d"),portNum);
+  wsprintf(name,TEXT("\\\\.\\COM%d"),portNum);
   port = CreateFile(name,
       GENERIC_READ | GENERIC_WRITE,
       0,             /* comm devices must be opened with exclusive access */

Reply | Threaded
Open this post in threaded view
|

Re: [commit] r2155 - Fix for max. number of serial ports.

Levente Uzonyi-2
 
Thanks.


Levente

On Thu, 11 Mar 2010, [hidden email] wrote:

>
> Author: andreas
> Date: 2010-03-11 11:11:11 -0800 (Thu, 11 Mar 2010)
> New Revision: 2155
>
> Modified:
>   trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c
> Log:
> Fix for max. number of serial ports.
>
> Modified: trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c
> ===================================================================
> --- trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c 2010-03-11 17:00:34 UTC (rev 2154)
> +++ trunk/platforms/win32/plugins/SerialPlugin/sqWin32SerialPort.c 2010-03-11 19:11:11 UTC (rev 2155)
> @@ -21,7 +21,7 @@
> #endif
>
> /* Maximum number of serial ports supported */
> -#define MAX_SERIAL_PORTS 16
> +#define MAX_SERIAL_PORTS 256
>
> /* Size of the queues used by the driver */
> #define  IN_QUEUE_SIZE 4096
> @@ -108,7 +108,7 @@
>       success(false);
>       return 0;
>     }
> -  wsprintf(name,TEXT("COM%d"),portNum);
> +  wsprintf(name,TEXT("\\\\.\\COM%d"),portNum);
>   port = CreateFile(name,
>       GENERIC_READ | GENERIC_WRITE,
>       0,             /* comm devices must be opened with exclusive access */
>
>