Commit 7c4cb13bbcfc7869e0ac7f5c623ecf2f7eea76d7
1 parent
b1423d73
Add comment to explain the complex naming scheme of COMs on Win32
Reported by Marco Sala.
Showing
1 changed file
with
4 additions
and
1 deletions
src/modbus-rtu.c
| @@ -805,7 +805,10 @@ const modbus_backend_t _modbus_rtu_backend = { | @@ -805,7 +805,10 @@ const modbus_backend_t _modbus_rtu_backend = { | ||
| 805 | 805 | ||
| 806 | /* Allocate and initialize the modbus_t structure for RTU | 806 | /* Allocate and initialize the modbus_t structure for RTU |
| 807 | - device: "/dev/ttyS0" | 807 | - device: "/dev/ttyS0" |
| 808 | - - baud: 9600, 19200, 57600, 115200, etc | 808 | + On Win32, it's necessary to prepend COM name with "\\.\" for COM number |
| 809 | + greater than 9, eg. "\\\\.\\COM10". See | ||
| 810 | + http://msdn.microsoft.com/en-us/library/aa365247(v=vs.85).aspx for details. | ||
| 811 | + - baud: 9600, 19200, 57600, 115200, etc | ||
| 809 | - parity: 'N' stands for None, 'E' for Even and 'O' for odd | 812 | - parity: 'N' stands for None, 'E' for Even and 'O' for odd |
| 810 | - data_bits: 5, 6, 7, 8 | 813 | - data_bits: 5, 6, 7, 8 |
| 811 | - stop_bits: 1, 2 | 814 | - stop_bits: 1, 2 |