##// END OF EJS Templates
Inverted RTS CTS signals.
jeandet@PC-DE-JEANDET.lab-lpp.local -
r29:916974002380 alexis
parent child
Show More
@@ -95,10 +95,10 int rs232setup(rs232port_t fd, int ChSiz
95 dcbSerialParams.Parity=Parity;
95 dcbSerialParams.Parity=Parity;
96 SetCommState(fd, &dcbSerialParams);
96 SetCommState(fd, &dcbSerialParams);
97 COMMTIMEOUTS timeouts={0};
97 COMMTIMEOUTS timeouts={0};
98 timeouts.ReadIntervalTimeout=10;
98 timeouts.ReadIntervalTimeout=100;
99 timeouts.ReadTotalTimeoutConstant=10;
99 timeouts.ReadTotalTimeoutConstant=100;
100 timeouts.ReadTotalTimeoutMultiplier=1;
100 timeouts.ReadTotalTimeoutMultiplier=1;
101 timeouts.WriteTotalTimeoutConstant=50;
101 timeouts.WriteTotalTimeoutConstant=100;
102 timeouts.WriteTotalTimeoutMultiplier=10;
102 timeouts.WriteTotalTimeoutMultiplier=10;
103 SetCommTimeouts(fd, &timeouts);
103 SetCommTimeouts(fd, &timeouts);
104 return 0;
104 return 0;
@@ -255,21 +255,21 int rs232safewrite(rs232port_t fd,char*
255
255
256 int rs232setRTS(rs232port_t fd)
256 int rs232setRTS(rs232port_t fd)
257 {
257 {
258 if(EscapeCommFunction(fd, SETRTS))
258 if(EscapeCommFunction(fd, CLRRTS))
259 return 0;
259 return 0;
260 return -1;
260 return -1;
261 }
261 }
262
262
263 int rs232clearRTS(rs232port_t fd)
263 int rs232clearRTS(rs232port_t fd)
264 {
264 {
265 if(EscapeCommFunction(fd, CLRRTS))
265 if(EscapeCommFunction(fd, SETRTS))
266 return 0;
266 return 0;
267 return -1;
267 return -1;
268 }
268 }
269
269
270 int rs232setDTR(rs232port_t fd)
270 int rs232setDTR(rs232port_t fd)
271 {
271 {
272 if(EscapeCommFunction(fd, SETDTR))
272 if(EscapeCommFunction(fd, CLRDTR))
273 return 0;
273 return 0;
274 return -1;
274 return -1;
275 }
275 }
@@ -277,11 +277,9 int rs232setDTR(rs232port_t fd)
277
277
278 int rs232clearDTR(rs232port_t fd)
278 int rs232clearDTR(rs232port_t fd)
279 {
279 {
280 if(EscapeCommFunction(fd, CLRDTR))
280 if(EscapeCommFunction(fd, SETDTR))
281 return 0;
281 return 0;
282 return -1;
282 return -1;
283 }
283 }
284
284
285
286
287 #endif //#ifdef HAVE_WINDOWS_H
285 #endif //#ifdef HAVE_WINDOWS_H
1 NO CONTENT: file was removed
NO CONTENT: file was removed
This diff has been collapsed as it changes many lines, (599 lines changed) Show them Hide them
General Comments 0
You need to be logged in to leave comments. Login now