From 07b4691c2a07f4f67f2d7ed7c7e61acb78949f30 Mon Sep 17 00:00:00 2001 From: Michal Ludvig Date: Mon, 2 Nov 2009 23:52:52 +0000 Subject: [PATCH] * arduino.c: Add on to bug #26703 / patch #6866 - clear DTR/RTS when closing the port. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@874 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ChangeLog | 5 +++++ arduino.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/ChangeLog b/ChangeLog index 695777a7..ec233133 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2009-11-03 Michal Ludvig + + * arduino.c: Add on to bug #26703 / patch #6866 - clear DTR/RTS + when closing the port. + 2009-10-22 David Hoerl * usb_libusb.c: disabled usb_reset for Macs (same as FreeBSD) diff --git a/arduino.c b/arduino.c index fd80567c..b60954a6 100644 --- a/arduino.c +++ b/arduino.c @@ -107,6 +107,12 @@ static int arduino_open(PROGRAMMER * pgm, char * port) return 0; } +static void arduino_close(PROGRAMMER * pgm) +{ + serial_set_dtr_rts(&pgm->fd, 0); + serial_close(&pgm->fd); + pgm->fd.ifd = -1; +} void arduino_initpgm(PROGRAMMER * pgm) { @@ -119,4 +125,5 @@ void arduino_initpgm(PROGRAMMER * pgm) strcpy(pgm->type, "Arduino"); pgm->read_sig_bytes = arduino_read_sig_bytes; pgm->open = arduino_open; + pgm->close = arduino_close; }