mirror of
git://projects.qi-hardware.com/ben-blinkenlights.git
synced 2024-11-27 18:06:16 +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
|
||||
===================================================================
|
||||
--- avrdude.orig/avrdude-5.10/Makefile.am 2011-02-09 21:16:39.000000000 -0300
|
||||
+++ avrdude/avrdude-5.10/Makefile.am 2011-02-09 21:17:04.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-15 00:16:52.000000000 -0300
|
||||
@@ -111,6 +111,8 @@
|
||||
lists.c \
|
||||
lists.h \
|
||||
@ -13,8 +13,8 @@ Index: avrdude/avrdude-5.10/Makefile.am
|
||||
pgm.c \
|
||||
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/avrdude-5.10/config_gram.y 2011-02-09 21:17:04.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-15 00:16:52.000000000 -0300
|
||||
@@ -48,6 +48,7 @@
|
||||
#include "avr.h"
|
||||
#include "jtagmkI.h"
|
||||
@ -46,8 +46,8 @@ Index: avrdude/avrdude-5.10/config_gram.y
|
||||
current_prog->desc[PGM_DESCLEN-1] = 0;
|
||||
Index: avrdude/avrdude-5.10/lexer.l
|
||||
===================================================================
|
||||
--- avrdude.orig/avrdude-5.10/lexer.l 2011-02-09 21:16:39.000000000 -0300
|
||||
+++ avrdude/avrdude-5.10/lexer.l 2011-02-09 21:17:04.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-15 00:16:52.000000000 -0300
|
||||
@@ -164,6 +164,7 @@
|
||||
min_write_delay { yylval=NULL; return K_MIN_WRITE_DELAY; }
|
||||
miso { yylval=NULL; return K_MISO; }
|
||||
@ -59,8 +59,8 @@ Index: avrdude/avrdude-5.10/lexer.l
|
||||
Index: avrdude/avrdude-5.10/nanonote.c
|
||||
===================================================================
|
||||
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ avrdude/avrdude-5.10/nanonote.c 2011-02-09 21:17:18.000000000 -0300
|
||||
@@ -0,0 +1,295 @@
|
||||
+++ avrdude/avrdude-5.10/nanonote.c 2011-02-15 00:20:23.000000000 -0300
|
||||
@@ -0,0 +1,290 @@
|
||||
+/*
|
||||
+ * avrdude - A Downloader/Uploader for AVR device programmers
|
||||
+ * 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
|
||||
+ * 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.
|
||||
+ */
|
||||
+
|
||||
+
|
||||
+//#include "ac_cfg.h"
|
||||
+
|
||||
+#include <stdint.h>
|
||||
+#include <stdlib.h>
|
||||
+#include <stdio.h>
|
||||
@ -98,15 +95,7 @@ Index: avrdude/avrdude-5.10/nanonote.c
|
||||
+#include <fcntl.h>
|
||||
+#include <sys/mman.h>
|
||||
+
|
||||
+/*
|
||||
+#include <errno.h>
|
||||
+#include <sys/ioctl.h>
|
||||
+#include <termios.h>
|
||||
+*/
|
||||
+
|
||||
+//#include "avrdude.h"
|
||||
+#include "avr.h"
|
||||
+//#include "pindefs.h"
|
||||
+#include "pgm.h"
|
||||
+#include "bitbang.h"
|
||||
+
|
||||
@ -290,7 +279,13 @@ Index: avrdude/avrdude-5.10/nanonote.c
|
||||
+
|
||||
+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
|
||||
===================================================================
|
||||
--- /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 @@
|
||||
+#ifndef nanonote_h
|
||||
+#define nanonote_h
|
||||
|
Loading…
Reference in New Issue
Block a user