* linux_ppdev.h: New file.

* ppi.c: Include system dependant parallel port interface file.
(ppi_open): Add call to ppi_claim().
(ppi_close): Add call to ppi_release().
* ppi.h: Define ppi_claim() and ppi_release() as NOPs if not previously
    defined.
* stk500.c: Include inttypes header to quell compiler warning.


git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@184 81a1dc3b-b13d-400b-aceb-764788c761c2
This commit is contained in:
Theodore A. Roth
2003-02-11 23:50:31 +00:00
parent 15431a8210
commit be8e278739
4 changed files with 53 additions and 0 deletions

9
ppi.c
View File

@@ -25,7 +25,12 @@
#include <fcntl.h>
#include <unistd.h>
#include <errno.h>
#if defined(__FreeBSD__)
#include <dev/ppbus/ppi.h>
#elif defined(__linux__)
#include "linux_ppdev.h"
#endif
#include "avr.h"
#include "pindefs.h"
@@ -760,11 +765,15 @@ void ppi_open(PROGRAMMER * pgm, char * port)
progname, port, strerror(errno));
exit(1);
}
ppi_claim(pgm);
}
void ppi_close(PROGRAMMER * pgm)
{
ppi_release(pgm);
close(pgm->fd);
pgm->fd = -1;
}