[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avrdude-dev] [patch #6866] bug #26703: [Feature Request] Support device
From: |
Michael Dreher |
Subject: |
[avrdude-dev] [patch #6866] bug #26703: [Feature Request] Support device reset for 'arduino' programmer type |
Date: |
Mon, 12 Oct 2009 18:53:48 +0000 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729) Creative ZENcast v2.01.01 |
Follow-up Comment #9, patch #6866 (project avrdude):
Hi Michal,
> Is it safe to do it like this?
No, it has to be done when closing the port, not in the open() function:
--- arduino.c.orig 2009-10-10 10:26:40 +0200
+++ arduino.c 2009-10-12 20:35:33 +0200
@@ -107,6 +107,14 @@
}
+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)
{
/* This is mostly a STK500; just the signature is read
@@ -118,4 +126,7 @@
strcpy(pgm->type, "Arduino");
pgm->read_sig_bytes = arduino_read_sig_bytes;
pgm->open = arduino_open;
+ pgm->close = arduino_close;
}
+
Michael
_______________________________________________________
Reply to this item at:
<http://savannah.nongnu.org/patch/?6866>
_______________________________________________
Nachricht geschickt von/durch Savannah
http://savannah.nongnu.org/