mirror of
https://github.com/mariusgreuel/avrdude.git
synced 2025-09-27 22:45:27 +00:00
* 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:
9
ppi.c
9
ppi.c
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user