This patch has been contributed by an anonymous developer

via the patch tracking system.

patch #5096: Allow VCC and BUFF to be any pin in parallel mode

* config_gram.y: Release the restriction to PPIDATA pins.
* par.c: Rework the code to introduce a function par_setmany()
that builds on top of par_setpin(), and use that function for the
PPI_AVR_VCC and PPI_AVR_BUFF pin collections.  This also abstracts
the polarity of these signals appropriately.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@628 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Joerg Wunsch
2006-08-29 21:39:26 +00:00
parent cd0e455a90
commit 3917cbe3a4
3 changed files with 46 additions and 46 deletions

View File

@@ -430,15 +430,7 @@ prog_parm :
while (lsize(number_list)) {
t = lrmv_n(number_list, 1);
pin = t->value.number;
if ((pin < 2) || (pin > 9)) {
fprintf(stderr,
"%s: error at line %d of %s: VCC must be one or more "
"pins from the range 2-9\n",
progname, lineno, infile);
exit(1);
}
current_prog->pinno[PPI_AVR_VCC] |= (1 << (pin-2));
current_prog->pinno[PPI_AVR_VCC] |= (1 << pin);
free_token(t);
}
@@ -455,15 +447,7 @@ prog_parm :
while (lsize(number_list)) {
t = lrmv_n(number_list, 1);
pin = t->value.number;
if ((pin < 2) || (pin > 9)) {
fprintf(stderr,
"%s: error at line %d of %s: BUFF must be one or more "
"pins from the range 2-9\n",
progname, lineno, infile);
exit(1);
}
current_prog->pinno[PPI_AVR_BUFF] |= (1 << (pin-2));
current_prog->pinno[PPI_AVR_BUFF] |= (1 << pin);
free_token(t);
}