|
|
@@ -322,7 +322,7 @@ static int sysFds [64] = |
|
|
|
|
|
|
|
// ISR Data |
|
|
|
|
|
|
|
static void (*isrFunctions [64])(void) ; |
|
|
|
static void (*isrFunctions [64])(void*) ; |
|
|
|
|
|
|
|
|
|
|
|
// Doing it the Arduino way with lookup tables... |
|
|
@@ -1933,7 +1933,7 @@ static void *interruptHandler (UNU void *arg) |
|
|
|
|
|
|
|
for (;;) |
|
|
|
if (waitForInterrupt (myPin, -1) > 0) |
|
|
|
isrFunctions [myPin] () ; |
|
|
|
isrFunctions [myPin] (arg) ; |
|
|
|
|
|
|
|
return NULL ; |
|
|
|
} |
|
|
@@ -1947,7 +1947,7 @@ static void *interruptHandler (UNU void *arg) |
|
|
|
********************************************************************************* |
|
|
|
*/ |
|
|
|
|
|
|
|
int wiringPiISR (int pin, int mode, void (*function)(void)) |
|
|
|
int wiringPiISR (int pin, int mode, void (*function)(void), void* userData) |
|
|
|
{ |
|
|
|
pthread_t threadId ; |
|
|
|
const char *modeS ; |
|
|
@@ -2029,7 +2029,7 @@ int wiringPiISR (int pin, int mode, void (*function)(void)) |
|
|
|
|
|
|
|
pthread_mutex_lock (&pinMutex) ; |
|
|
|
pinPass = pin ; |
|
|
|
pthread_create (&threadId, NULL, interruptHandler, NULL) ; |
|
|
|
pthread_create (&threadId, NULL, interruptHandler, userData) ; |
|
|
|
while (pinPass != -1) |
|
|
|
delay (1) ; |
|
|
|
pthread_mutex_unlock (&pinMutex) ; |
|
|
|