From d699f2bbd545df487885c994e2060d697dd023dc Mon Sep 17 00:00:00 2001 From: mludvig Date: Sun, 7 Mar 2010 21:27:22 +0000 Subject: [PATCH] * ser_posix.c(ser_set_dtr_rts): Fixed DTR on/off to make Arduino auto-reset work. (bug #29108, patch #7100) git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@940 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 5 +++++ ser_posix.c | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 907be896..1b8650dd 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-03-08 Michal Ludvig + + * ser_posix.c(ser_set_dtr_rts): Fixed DTR on/off to make + Arduino auto-reset work. (bug #29108, patch #7100) + 2010-03-05 Joerg Wunsch * buspirate.c: Replace printf() by fprintf(stderr) diff --git a/ser_posix.c b/ser_posix.c index a37e5290..5344115b 100644 --- a/ser_posix.c +++ b/ser_posix.c @@ -230,13 +230,13 @@ static int ser_set_dtr_rts(union filedescriptor *fdp, int is_on) } if (is_on) { - /* Clear DTR and RTS */ - ctl &= ~(TIOCM_DTR | TIOCM_RTS); - } - else { /* Set DTR and RTS */ ctl |= (TIOCM_DTR | TIOCM_RTS); } + else { + /* Clear DTR and RTS */ + ctl &= ~(TIOCM_DTR | TIOCM_RTS); + } r = ioctl(fdp->ifd, TIOCMSET, &ctl); if (r < 0) {