From 75f552793776e84635f011a29cb6ad3106305791 Mon Sep 17 00:00:00 2001 From: bdean Date: Wed, 19 May 2004 21:02:25 +0000 Subject: [PATCH] Stub-out the ppi_* functions in ppi.c with empty wrappers that simply return an error code when building on MacOS X. This commit makes AVRDUDE compile and run fine on my PowerMac G5 running MacOS X. In theory it would be possible to support parallel ports on the Mac using a PCI multi-port card and/or USB<->Parallel converters. If/when such support is added we can flesh out these functions as needed, but for now, only serial port programmers are currently supported. Note that I tested avrdude on the G5/MacOS X with an STK500 programmer and used a Keyspan model USA-19HS USB<->RS232 adapter device which simply shows up in /dev as a POSIX serial port. None of the serial port handling needed any changes. git-svn-id: svn://svn.savannah.nongnu.org/avrdude/trunk/avrdude@415 81a1dc3b-b13d-400b-aceb-764788c761c2 --- ppi.c | 71 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 71 insertions(+) diff --git a/ppi.c b/ppi.c index a4faec97..b3396393 100644 --- a/ppi.c +++ b/ppi.c @@ -232,4 +232,75 @@ void ppi_close(int fd) } +#elif defined(__POWERPC__) && defined(__APPLE__) + +int ppi_shadow_access(int fd, int reg, unsigned char *v, unsigned char action) +{ + return -1; +} + +/* + * set the indicated bit of the specified register. + */ +int ppi_set(int fd, int reg, int bit) +{ + return -1; +} + + +/* + * clear the indicated bit of the specified register. + */ +int ppi_clr(int fd, int reg, int bit) +{ + return -1; +} + + +/* + * get the indicated bit of the specified register. + */ +int ppi_get(int fd, int reg, int bit) +{ + return -1; +} + +/* + * toggle the indicated bit of the specified register. + */ +int ppi_toggle(int fd, int reg, int bit) +{ + return -1; +} + + +/* + * get all bits of the specified register. + */ +int ppi_getall(int fd, int reg) +{ + return -1; +} + +/* + * set all bits of the specified register to val. + */ +int ppi_setall(int fd, int reg, int val) +{ + return -1; +} + + +int ppi_open(char * port) +{ + return -1; +} + + +void ppi_close(int fd) +{ +} + + #endif +