mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-12-18 03:14:42 +00:00
Submitted by Doug Springer, based on work by
Wolfgang Moser, Ville Voipio, Hannes Weisbach patch #7486: Patch to add FT2232C/D, FT2232H, FT4232H, usbvid, usbpid, usbdev for USB support - Based on #7062 * avrftdi.c: New file. * avrftdi.h: (Ditto.) * configure.ac: Add check for libftdi. * config_gram.y: Add AVRFTDI and per-programmer USB string keywords. * lexer.l: (Ditto.) * avrdude.conf.in: Add avrftdi and 2232HIO programmers. * pgm.h: Add USB parameters. * Makefile.am: Add avrftdi.c and avrftdi.h. * AUTHORS: Mention the new authors. * avrdude.1: Document the changes. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@979 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -48,6 +48,7 @@
|
||||
#include "avr.h"
|
||||
#include "jtagmkI.h"
|
||||
#include "jtagmkII.h"
|
||||
#include "avrftdi.h"
|
||||
|
||||
#if defined(WIN32NATIVE)
|
||||
#define strtok_r( _s, _sep, _lasts ) \
|
||||
@@ -82,6 +83,7 @@ static int parse_cmdbits(OPCODE * op);
|
||||
%token K_PAGED
|
||||
|
||||
%token K_ARDUINO
|
||||
%token K_AVRFTDI
|
||||
%token K_BAUDRATE
|
||||
%token K_BS2
|
||||
%token K_BUFF
|
||||
@@ -149,7 +151,13 @@ static int parse_cmdbits(OPCODE * op);
|
||||
%token K_STK600PP
|
||||
%token K_AVR910
|
||||
%token K_USBASP
|
||||
%token K_USBDEV
|
||||
%token K_USBSN
|
||||
%token K_USBTINY
|
||||
%token K_USBPID
|
||||
%token K_USBPRODUCT
|
||||
%token K_USBVENDOR
|
||||
%token K_USBVID
|
||||
%token K_BUTTERFLY
|
||||
%token K_TYPE
|
||||
%token K_VCC
|
||||
@@ -432,6 +440,12 @@ prog_parm :
|
||||
}
|
||||
} |
|
||||
|
||||
K_TYPE TKN_EQUAL K_AVRFTDI {
|
||||
{
|
||||
avrftdi_initpgm(current_prog);
|
||||
}
|
||||
} |
|
||||
|
||||
K_TYPE TKN_EQUAL K_BUSPIRATE {
|
||||
{
|
||||
buspirate_initpgm(current_prog);
|
||||
@@ -590,7 +604,49 @@ prog_parm :
|
||||
}
|
||||
}
|
||||
} |
|
||||
K_USBDEV TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbdev, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbdev[PGM_USBSTRINGLEN-1] = 0;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
K_USBVID TKN_EQUAL TKN_NUMBER {
|
||||
{
|
||||
current_prog->usbvid = $3->value.number;
|
||||
}
|
||||
} |
|
||||
|
||||
K_USBPID TKN_EQUAL TKN_NUMBER {
|
||||
{
|
||||
current_prog->usbpid = $3->value.number;
|
||||
}
|
||||
} |
|
||||
|
||||
K_USBSN TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbsn, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbsn[PGM_USBSTRINGLEN-1] = 0;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
|
||||
K_USBVENDOR TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbvendor, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbvendor[PGM_USBSTRINGLEN-1] = 0;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
|
||||
K_USBPRODUCT TKN_EQUAL TKN_STRING {
|
||||
{
|
||||
strncpy(current_prog->usbproduct, $3->value.string, PGM_USBSTRINGLEN);
|
||||
current_prog->usbproduct[PGM_USBSTRINGLEN-1] = 0;
|
||||
free_token($3);
|
||||
}
|
||||
} |
|
||||
|
||||
K_BAUDRATE TKN_EQUAL TKN_NUMBER {
|
||||
{
|
||||
current_prog->baudrate = $3->value.number;
|
||||
|
||||
Reference in New Issue
Block a user