Browse Source

Fix gpio ISR

Gpio utility gets wpi pin numger, not gpio pin number. Calling with latter leads to error.
pull/20/head
Dmitry Petuhov 5 years ago
parent
commit
b584dd1ceb
  1. 2
      wiringPi/wiringPi.c

2
wiringPi/wiringPi.c

@ -2030,7 +2030,7 @@ int wiringPiISR (int pin, int mode, void (*function)(void))
else
modeS = "both" ;
sprintf (pinS, "%d", bcmGpioPin) ;
sprintf (pinS, "%d", pin) ;
if ((pid = fork ()) < 0) // Fail
return wiringPiFailure (WPI_FATAL, "wiringPiISR: fork failed: %s\n", strerror (errno)) ;

Loading…
Cancel
Save