Rework the exit specs so they actually work again. It should be

possible to extend them for other programmers than PPI now (serbb,
stk500*).

* pgm.h: Keep the exit specs in an abstract form inside struct
programmer_t.  (Should be moved out into some programmer-specific
structure.)  Rename the getexitspecs() method into
parseexitspecs().
* main.c: Move the exit specs stuff out to the programmer
implementation.
* par.c: Implement the new exit spec handling.  Everything is now
done using the generic abstraction layer.

Closes bug #16443: No disable Resetsignal at the end of
Programming Session

Obviates need for patch #5057: quick and dirty Hack to unset Reset
after Programming


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk@629 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2006-08-29 23:12:15 +00:00
parent 9473243b2c
commit 00791df09d
4 changed files with 78 additions and 37 deletions

View File

@@ -38,12 +38,26 @@
extern LISTID programmers;
typedef enum {
EXIT_VCC_UNSPEC,
EXIT_VCC_ENABLED,
EXIT_VCC_DISABLED
} exit_vcc_t;
typedef enum {
EXIT_RESET_UNSPEC,
EXIT_RESET_ENABLED,
EXIT_RESET_DISABLED
} exit_reset_t;
typedef struct programmer_t {
LISTID id;
char desc[PGM_DESCLEN];
char type[PGM_TYPELEN];
char port[PGM_PORTLEN];
unsigned int pinno[N_PINS];
exit_vcc_t exit_vcc;
exit_reset_t exit_reset;
int ppidata;
int ppictrl;
int baudrate;
@@ -85,7 +99,7 @@ typedef struct programmer_t {
int (*setpin) (struct programmer_t * pgm, int pin, int value);
int (*getpin) (struct programmer_t * pgm, int pin);
int (*highpulsepin) (struct programmer_t * pgm, int pin);
int (*getexitspecs) (struct programmer_t * pgm, char *s, int *set, int *clr);
int (*parseexitspecs) (struct programmer_t * pgm, char *s);
char config_file[PATH_MAX]; /* config file where defined */
int lineno; /* config file line number */
char flag; /* for private use of the programmer */