浏览代码

Add comment to explain the complex naming scheme of COMs on Win32

Reported by Marco Sala.
Stéphane Raimbault 14 年之前
父节点
当前提交
7c4cb13bbc
共有 1 个文件被更改,包括 4 次插入1 次删除
  1. 4 1
      src/modbus-rtu.c

+ 4 - 1
src/modbus-rtu.c

@@ -805,7 +805,10 @@ const modbus_backend_t _modbus_rtu_backend = {
 
 /* Allocate and initialize the modbus_t structure for RTU
    - device: "/dev/ttyS0"
-   - baud:   9600, 19200, 57600, 115200, etc
+     On Win32, it's necessary to prepend COM name with "\\.\" for COM number
+     greater than 9, eg. "\\\\.\\COM10". See
+     http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx for details.
+   - baud: 9600, 19200, 57600, 115200, etc
    - parity: 'N' stands for None, 'E' for Even and 'O' for odd
    - data_bits: 5, 6, 7, 8
    - stop_bits: 1, 2