ntdisp 

ntdisp Commit Details

Date:2013-11-19 00:03:39 (6 years 11 months ago)
Author:Nicola Fontana
Branch:master
Commit:e0478bda313172c6aa7271203eb2ed80326bbaa4
Parents: 632eb4502683c4908877b369d3dd458482b57db9
Message:win32: adjust (again) timeout settings

Changes:
Msrc/lib/ntd-serial-win32.c (1 diff)

File differences

src/lib/ntd-serial-win32.c
168168
169169
170170
171
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
172192
173
174
175
176
177
193
194
195
196
197
178198
179199
180200
if (ntd_device_set_error_from_system(device, P_("`SetCommState' call")))
return;
/* All the time values are in milliseconds */
/* All the time values are in milliseconds:
*
* ReadIntervalTimeout
* The maximum time allowed to elapse before the arrival of the
* next byte on the communications line.
*
* ReadTotalTimeoutMultiplier
* For each read operation, this value is multiplied by the
* requested number of bytes to be read.
*
* ReadTotalTimeoutConstant
* For each read operation, this value is added to the product of
* the ReadTotalTimeoutMultiplier member and the requested number
* of bytes. The result will be considered the total timeout of a
* ReadFile() call.
*
* WriteTotalTimeoutMultiplier
* WriteTotalTimeoutConstant
* Same as ReadTotalTimeoutMultiplier and ReadTotalTimeoutConstant,
* but for write operations.
*/
COMMTIMEOUTS TimeOuts = {
0, /* Timeout between two char reads */
0, /* Time needed for reading one char */
data->timeout * 1000, /* Time to add for a single read */
0, /* Time needed for writing one char */
0 /* Time to add for a single write */
data->timeout * 1000, /* ReadIntervalTimeout */
0, /* ReadTotalTimeoutMultiplier */
data->timeout * 1000, /* ReadTotalTimeoutConstant */
0, /* WriteTotalTimeoutMultiplier */
0 /* WriteTotalTimeoutConstant */
};
SetCommTimeouts(win32->handle, &TimeOuts);

Archive Download the corresponding diff file

Branches

Tags