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
This commit is contained in:
bdean 2004-05-19 21:02:25 +00:00
parent dc9fa44109
commit 75f5527937
1 changed files with 71 additions and 0 deletions

71
ppi.c
View File

@ -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 #endif