mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-28 06:55:27 +00:00
Split higher level parallel port programmer code off from ppi.c into
its own file par.c, leaving low level parallel port accessor routines in ppi.c to help with portability. Change the programmer type to 'PAR' now instead of 'PPI' - 'PAR' represents the parallel port programmer type. Be more liberal with 'static' function declarations within the programmer implimentation files - these functions should never be called directly - always use the programmer function references. There are still a few places in 'main.c' that directly reference the parallel programmer explicitly (par_getpinmask). These should be fixed somehow. Axe a few unused functions. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@190 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
7
main.c
7
main.c
@@ -78,6 +78,7 @@
|
||||
#include "avr.h"
|
||||
#include "config.h"
|
||||
#include "fileio.h"
|
||||
#include "par.h"
|
||||
#include "pindefs.h"
|
||||
#include "ppi.h"
|
||||
#include "term.h"
|
||||
@@ -128,10 +129,10 @@ int getexitspecs(char *s, int *set, int *clr)
|
||||
|
||||
while ((cp = strtok(s, ","))) {
|
||||
if (strcmp(cp, "reset") == 0) {
|
||||
*clr |= ppi_getpinmask(pgm->pinno[PIN_AVR_RESET]);
|
||||
*clr |= par_getpinmask(pgm->pinno[PIN_AVR_RESET]);
|
||||
}
|
||||
else if (strcmp(cp, "noreset") == 0) {
|
||||
*set |= ppi_getpinmask(pgm->pinno[PIN_AVR_RESET]);
|
||||
*set |= par_getpinmask(pgm->pinno[PIN_AVR_RESET]);
|
||||
}
|
||||
else if (strcmp(cp, "vcc") == 0) {
|
||||
if (pgm->pinno[PPI_AVR_VCC])
|
||||
@@ -341,7 +342,7 @@ int main(int argc, char * argv [])
|
||||
*/
|
||||
compiled_in_pgm = pgm_new();
|
||||
pgm = compiled_in_pgm;
|
||||
ppi_initpgm(pgm);
|
||||
par_initpgm(pgm);
|
||||
ladd(pgm->id, dup_string("avrdude"));
|
||||
strcpy(pgm->desc, "avrdude compiled-in default");
|
||||
pgm->pinno[PPI_AVR_VCC] = 0x0f; /* ppi pins 2-5, data reg bits 0-3 */
|
||||
|
Reference in New Issue
Block a user