mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-16 18:05:19 +02:00
nanonote.patch: cleanup and properly power down on exit (also turns off LED)
- nanonote.c: remove some commented-out items - nanonote.c (nanonote_powerdown): make all data lines inputs on exit, making it more likely that the target powers down
This commit is contained in:
parent
36a44995cd
commit
0c56f05575
@ -1,7 +1,7 @@
|
|||||||
Index: avrdude/avrdude-5.10/Makefile.am
|
Index: avrdude/avrdude-5.10/Makefile.am
|
||||||
===================================================================
|
===================================================================
|
||||||
--- avrdude.orig/avrdude-5.10/Makefile.am 2011-02-09 21:16:39.000000000 -0300
|
--- avrdude.orig/avrdude-5.10/Makefile.am 2011-02-15 00:16:48.000000000 -0300
|
||||||
+++ avrdude/avrdude-5.10/Makefile.am 2011-02-09 21:17:04.000000000 -0300
|
+++ avrdude/avrdude-5.10/Makefile.am 2011-02-15 00:16:52.000000000 -0300
|
||||||
@@ -111,6 +111,8 @@
|
@@ -111,6 +111,8 @@
|
||||||
lists.c \
|
lists.c \
|
||||||
lists.h \
|
lists.h \
|
||||||
@ -13,8 +13,8 @@ Index: avrdude/avrdude-5.10/Makefile.am
|
|||||||
pgm.c \
|
pgm.c \
|
||||||
Index: avrdude/avrdude-5.10/config_gram.y
|
Index: avrdude/avrdude-5.10/config_gram.y
|
||||||
===================================================================
|
===================================================================
|
||||||
--- avrdude.orig/avrdude-5.10/config_gram.y 2011-02-09 21:16:39.000000000 -0300
|
--- avrdude.orig/avrdude-5.10/config_gram.y 2011-02-15 00:16:48.000000000 -0300
|
||||||
+++ avrdude/avrdude-5.10/config_gram.y 2011-02-09 21:17:04.000000000 -0300
|
+++ avrdude/avrdude-5.10/config_gram.y 2011-02-15 00:16:52.000000000 -0300
|
||||||
@@ -48,6 +48,7 @@
|
@@ -48,6 +48,7 @@
|
||||||
#include "avr.h"
|
#include "avr.h"
|
||||||
#include "jtagmkI.h"
|
#include "jtagmkI.h"
|
||||||
@ -46,8 +46,8 @@ Index: avrdude/avrdude-5.10/config_gram.y
|
|||||||
current_prog->desc[PGM_DESCLEN-1] = 0;
|
current_prog->desc[PGM_DESCLEN-1] = 0;
|
||||||
Index: avrdude/avrdude-5.10/lexer.l
|
Index: avrdude/avrdude-5.10/lexer.l
|
||||||
===================================================================
|
===================================================================
|
||||||
--- avrdude.orig/avrdude-5.10/lexer.l 2011-02-09 21:16:39.000000000 -0300
|
--- avrdude.orig/avrdude-5.10/lexer.l 2011-02-15 00:16:48.000000000 -0300
|
||||||
+++ avrdude/avrdude-5.10/lexer.l 2011-02-09 21:17:04.000000000 -0300
|
+++ avrdude/avrdude-5.10/lexer.l 2011-02-15 00:16:52.000000000 -0300
|
||||||
@@ -164,6 +164,7 @@
|
@@ -164,6 +164,7 @@
|
||||||
min_write_delay { yylval=NULL; return K_MIN_WRITE_DELAY; }
|
min_write_delay { yylval=NULL; return K_MIN_WRITE_DELAY; }
|
||||||
miso { yylval=NULL; return K_MISO; }
|
miso { yylval=NULL; return K_MISO; }
|
||||||
@ -59,8 +59,8 @@ Index: avrdude/avrdude-5.10/lexer.l
|
|||||||
Index: avrdude/avrdude-5.10/nanonote.c
|
Index: avrdude/avrdude-5.10/nanonote.c
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ avrdude/avrdude-5.10/nanonote.c 2011-02-09 21:17:18.000000000 -0300
|
+++ avrdude/avrdude-5.10/nanonote.c 2011-02-15 00:20:23.000000000 -0300
|
||||||
@@ -0,0 +1,295 @@
|
@@ -0,0 +1,290 @@
|
||||||
+/*
|
+/*
|
||||||
+ * avrdude - A Downloader/Uploader for AVR device programmers
|
+ * avrdude - A Downloader/Uploader for AVR device programmers
|
||||||
+ * Copyright (C) 2000, 2001, 2002, 2003 Brian S. Dean <bsd@bsdhome.com>
|
+ * Copyright (C) 2000, 2001, 2002, 2003 Brian S. Dean <bsd@bsdhome.com>
|
||||||
@ -81,15 +81,12 @@ Index: avrdude/avrdude-5.10/nanonote.c
|
|||||||
+ * along with this program; if not, write to the Free Software
|
+ * along with this program; if not, write to the Free Software
|
||||||
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||||
+ */
|
+ */
|
||||||
+/* $Id: serbb_posix.c 917 2010-01-15 16:40:17Z joerg_wunsch $ */
|
|
||||||
+
|
+
|
||||||
+/*
|
+/*
|
||||||
+ * Posix serial bitbanging interface for avrdude.
|
+ * Posix serial bitbanging interface for avrdude.
|
||||||
+ */
|
+ */
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
+//#include "ac_cfg.h"
|
|
||||||
+
|
|
||||||
+#include <stdint.h>
|
+#include <stdint.h>
|
||||||
+#include <stdlib.h>
|
+#include <stdlib.h>
|
||||||
+#include <stdio.h>
|
+#include <stdio.h>
|
||||||
@ -98,15 +95,7 @@ Index: avrdude/avrdude-5.10/nanonote.c
|
|||||||
+#include <fcntl.h>
|
+#include <fcntl.h>
|
||||||
+#include <sys/mman.h>
|
+#include <sys/mman.h>
|
||||||
+
|
+
|
||||||
+/*
|
|
||||||
+#include <errno.h>
|
|
||||||
+#include <sys/ioctl.h>
|
|
||||||
+#include <termios.h>
|
|
||||||
+*/
|
|
||||||
+
|
|
||||||
+//#include "avrdude.h"
|
|
||||||
+#include "avr.h"
|
+#include "avr.h"
|
||||||
+//#include "pindefs.h"
|
|
||||||
+#include "pgm.h"
|
+#include "pgm.h"
|
||||||
+#include "bitbang.h"
|
+#include "bitbang.h"
|
||||||
+
|
+
|
||||||
@ -290,7 +279,13 @@ Index: avrdude/avrdude-5.10/nanonote.c
|
|||||||
+
|
+
|
||||||
+static void nanonote_powerdown(PROGRAMMER *pgm)
|
+static void nanonote_powerdown(PROGRAMMER *pgm)
|
||||||
+{
|
+{
|
||||||
+ misc_high(pgm);
|
+ gpio_input(DAT0);
|
||||||
|
+ gpio_input(CLK);
|
||||||
|
+ gpio_input(CMD);
|
||||||
|
+ gpio_input(DAT3);
|
||||||
|
+ gpio_input(DAT2);
|
||||||
|
+ gpio_input(DAT1);
|
||||||
|
+ gpio_high(POWER_OFF);
|
||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
+
|
+
|
||||||
@ -359,7 +354,7 @@ Index: avrdude/avrdude-5.10/nanonote.c
|
|||||||
Index: avrdude/avrdude-5.10/nanonote.h
|
Index: avrdude/avrdude-5.10/nanonote.h
|
||||||
===================================================================
|
===================================================================
|
||||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||||
+++ avrdude/avrdude-5.10/nanonote.h 2011-02-09 21:17:04.000000000 -0300
|
+++ avrdude/avrdude-5.10/nanonote.h 2011-02-15 00:16:52.000000000 -0300
|
||||||
@@ -0,0 +1,6 @@
|
@@ -0,0 +1,6 @@
|
||||||
+#ifndef nanonote_h
|
+#ifndef nanonote_h
|
||||||
+#define nanonote_h
|
+#define nanonote_h
|
||||||
|
Loading…
Reference in New Issue
Block a user