wiringPi : interrupt error fix.

Change-Id: I576ef6d2ef16723a7e23abf01c14caad7998c778
This commit is contained in:
charles.park
2017-12-07 14:38:25 +09:00
parent 517d8dd349
commit 060da4d553
2 changed files with 2 additions and 7 deletions

View File

@@ -627,7 +627,7 @@ void doUnexportall (char *progName)
FILE *fd ;
int pin ;
for (pin = 0 ; pin < 63 ; ++pin) {
for (pin = 0 ; pin < 256 ; ++pin) {
if ((fd = fopen ("/sys/class/gpio/unexport", "w")) == NULL) {
fprintf (stderr, "%s: Unable to open GPIO export interface\n", progName) ;
exit (1) ;

View File

@@ -137,7 +137,7 @@ int msg (int type, const char *message, ...)
}
/*----------------------------------------------------------------------------*/
static void warn_msg(const *func)
static void warn_msg(const char *func)
{
msg(MSG_WARN, "(%s) : This function is not supported by ODROID Board.\n", func);
}
@@ -504,11 +504,6 @@ int waitForInterrupt (int pin, int mS)
uint8_t c;
struct pollfd polls;
if (libwiring.getModeToGpio)
pin = libwiring.getModeToGpio(libwiring.mode, pin);
else
return -2;
if ((fd = libwiring.sysFds[pin]) == -1)
return -2;