Ticket #22867: patch-ser_win32.c.diff
File patch-ser_win32.c.diff, 1014 bytes (added by ranauei@…, 15 years ago) |
---|
-
ser_win32.c
old new 18 18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 19 19 */ 20 20 21 /* $Id: ser_win32.c 8 25 2009-07-02 10:23:57Z joerg_wunsch$ */21 /* $Id: ser_win32.c 865 2009-10-12 06:51:53Z mludvig $ */ 22 22 23 23 /* 24 24 * Native Win32 serial interface for avrdude. … … 203 203 hComPort = INVALID_HANDLE_VALUE; 204 204 } 205 205 206 static int ser_set_dtr_rts(union filedescriptor *fd, int is_on) 207 { 208 HANDLE hComPort=(HANDLE)fd->pfd; 209 210 if (is_on) { 211 EscapeCommFunction(hComPort, SETDTR); 212 EscapeCommFunction(hComPort, SETRTS); 213 } else { 214 EscapeCommFunction(hComPort, CLRDTR); 215 EscapeCommFunction(hComPort, CLRRTS); 216 } 217 return 0; 218 } 219 206 220 207 221 static int ser_send(union filedescriptor *fd, unsigned char * buf, size_t buflen) 208 222 { … … 378 392 .send = ser_send, 379 393 .recv = ser_recv, 380 394 .drain = ser_drain, 395 .set_dtr_rts = ser_set_dtr_rts, 381 396 .flags = SERDEV_FL_CANSETSPEED, 382 397 }; 383 398