mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 22:45:27 +00:00
Seperate programmer operations out into a driver-like interface so
that programmers other than the direct parallel port connection can be supported. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@159 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
@@ -60,8 +60,9 @@
|
||||
%token K_NUM_PAGES
|
||||
%token K_PART
|
||||
%token K_PGMLED
|
||||
%token K_PWROFF_AFTER_WRITE
|
||||
%token K_PPI
|
||||
%token K_PROGRAMMER
|
||||
%token K_PWROFF_AFTER_WRITE
|
||||
%token K_RDYLED
|
||||
%token K_READBACK_P1
|
||||
%token K_READBACK_P2
|
||||
@@ -69,6 +70,8 @@
|
||||
%token K_RESET
|
||||
%token K_SCK
|
||||
%token K_SIZE
|
||||
%token K_STK500
|
||||
%token K_TYPE
|
||||
%token K_VCC
|
||||
%token K_VFYLED
|
||||
%token K_WRITEPAGE
|
||||
@@ -102,7 +105,7 @@ def :
|
||||
|
||||
prog_def :
|
||||
K_PROGRAMMER
|
||||
{ current_prog = new_programmer(); }
|
||||
{ current_prog = pgm_new(); }
|
||||
prog_parms
|
||||
{
|
||||
if (lsize(current_prog->id) == 0) {
|
||||
@@ -111,6 +114,11 @@ prog_def :
|
||||
progname, infile, lineno);
|
||||
exit(1);
|
||||
}
|
||||
if (current_prog->type[0] == 0) {
|
||||
fprintf(stderr, "%s: error at %s:%d: programmer type not specified\n",
|
||||
progname, infile, lineno);
|
||||
exit(1);
|
||||
}
|
||||
ladd(programmers, current_prog);
|
||||
current_prog = NULL;
|
||||
}
|
||||
@@ -205,6 +213,18 @@ prog_parm :
|
||||
}
|
||||
} |
|
||||
|
||||
K_TYPE TKN_EQUAL K_PPI {
|
||||
{
|
||||
ppi_initpgm(current_prog);
|
||||
}
|
||||
} |
|
||||
|
||||
K_TYPE TKN_EQUAL K_STK500 {
|
||||
{
|
||||
fprintf(stderr, "%s: programmer 'stk500' not yet supported\n", progname);
|
||||
}
|
||||
} |
|
||||
|
||||
K_DESC TKN_EQUAL TKN_STRING {
|
||||
strncpy(current_prog->desc, $3->value.string, PGM_DESCLEN);
|
||||
current_prog->desc[PGM_DESCLEN-1] = 0;
|
||||
@@ -441,6 +461,7 @@ mem_spec :
|
||||
#include "config.h"
|
||||
#include "lists.h"
|
||||
#include "pindefs.h"
|
||||
#include "pgm.h"
|
||||
#include "avr.h"
|
||||
|
||||
extern char * progname;
|
||||
|
Reference in New Issue
Block a user