USBasp 2005.04.21.
[pub/USBasp.git] / software / avrdude_usbasp.2005-04-21.patch
1 ? usbasp.c
2 ? usbasp.h
3 Index: Makefile.am
4 ===================================================================
5 RCS file: /cvsroot/avrdude/avrdude/Makefile.am,v
6 retrieving revision 1.23
7 diff -u -r1.23 Makefile.am
8 --- Makefile.am 10 Feb 2005 14:54:57 -0000 1.23
9 +++ Makefile.am 9 Apr 2005 09:04:02 -0000
10 @@ -85,6 +85,8 @@
11 stk500.c \
12 stk500.h \
13 stk500_private.h \
14 + usbasp.c \
15 + usbasp.h \
16 term.c \
17 term.h
18
19 Index: avrdude.conf.in
20 ===================================================================
21 RCS file: /cvsroot/avrdude/avrdude/avrdude.conf.in,v
22 retrieving revision 1.36
23 diff -u -r1.36 avrdude.conf.in
24 --- avrdude.conf.in 22 Dec 2004 01:30:30 -0000 1.36
25 +++ avrdude.conf.in 9 Apr 2005 09:04:10 -0000
26 @@ -243,6 +243,12 @@
27 miso = 10;
28 ;
29
30 +programmer
31 + id = "usbasp";
32 + desc = "usbasp";
33 + type = usbasp;
34 +;
35 +
36 # The programming dongle used by the popular Ponyprog
37 # utility. It is almost similar to the STK200 one,
38 # except that there is a LED indicating that the
39 @@ -337,7 +343,6 @@
40 miso = 10;
41 ;
42
43 -
44 # From the contributor of the "xil" jtag cable:
45 # The "vcc" definition isn't really vcc (the cable gets its power from
46 # the programming circuit) but is necessary to switch one of the
47 Index: config_gram.y
48 ===================================================================
49 RCS file: /cvsroot/avrdude/avrdude/config_gram.y,v
50 retrieving revision 1.39
51 diff -u -r1.39 config_gram.y
52 --- config_gram.y 22 Dec 2004 01:52:45 -0000 1.39
53 +++ config_gram.y 9 Apr 2005 09:04:11 -0000
54 @@ -34,6 +34,7 @@
55 #include "pgm.h"
56 #include "stk500.h"
57 #include "avr910.h"
58 +#include "usbasp.h"
59 #include "butterfly.h"
60 #include "avr.h"
61
62 @@ -112,6 +113,7 @@
63 %token K_SIZE
64 %token K_STK500
65 %token K_AVR910
66 +%token K_USBASP
67 %token K_BUTTERFLY
68 %token K_TYPE
69 %token K_VCC
70 @@ -302,6 +304,11 @@
71 }
72 } |
73
74 + K_TYPE TKN_EQUAL K_USBASP {
75 + {
76 + usbasp_initpgm(current_prog);
77 + }
78 + } |
79 K_TYPE TKN_EQUAL K_BUTTERFLY {
80 {
81 butterfly_initpgm(current_prog);
82 Index: configure.ac
83 ===================================================================
84 RCS file: /cvsroot/avrdude/avrdude/configure.ac,v
85 retrieving revision 1.22
86 diff -u -r1.22 configure.ac
87 --- configure.ac 10 Feb 2005 15:39:42 -0000 1.22
88 +++ configure.ac 9 Apr 2005 09:04:11 -0000
89 @@ -104,6 +104,21 @@
90 AC_SUBST(SUBDIRS_AC, $SUBDIRS_AC)
91 AC_SUBST(DIST_SUBDIRS_AC, $DIST_SUBDIRS_AC)
92
93 +# USB stuff
94 +AH_TEMPLATE([HAVE_LIBUSB],
95 + [Define if USB support is enabled via libusb])
96 +AC_CHECK_LIB(usb, main, have_libusb=yes)
97 +if test x$have_libusb = xyes; then
98 + case $target in
99 + *-*-darwin*)
100 + LIBS="$LIBS -lusb -framework CoreFoundation -framework IOKit"
101 + ;;
102 + *)
103 + LIBS="$LIBS -lusb"
104 + ;;
105 + esac
106 + AC_DEFINE([HAVE_LIBUSB])
107 +fi
108
109 # Find the parallel serial device files based on target system
110 # If a system doesn't have a PC style parallel, mark it as unknown.
111 Index: lexer.l
112 ===================================================================
113 RCS file: /cvsroot/avrdude/avrdude/lexer.l,v
114 retrieving revision 1.30
115 diff -u -r1.30 lexer.l
116 --- lexer.l 22 Dec 2004 01:52:45 -0000 1.30
117 +++ lexer.l 9 Apr 2005 09:04:12 -0000
118 @@ -156,6 +156,7 @@
119 size { yylval=NULL; return K_SIZE; }
120 stk500 { yylval=NULL; return K_STK500; }
121 avr910 { yylval=NULL; return K_AVR910; }
122 +usbasp { yylval=NULL; return K_USBASP; }
123 butterfly { yylval=NULL; return K_BUTTERFLY; }
124 type { yylval=NULL; return K_TYPE; }
125 vcc { yylval=NULL; return K_VCC; }