Skip to content

Commit

Permalink
More bugfixes
Browse files Browse the repository at this point in the history
  • Loading branch information
WereCatf committed Mar 16, 2016
1 parent 6a7ec1f commit 336b916
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions wiringPi/wiringPi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2676,9 +2676,13 @@ int wiringPiISR (int pin, int mode, void (*function)(void))
printf("[%s:L%d] the pin:%d is invalid, please check it over!\n", __func__, __LINE__, pin);
return -1;
}

if(edge[bcmGpioPin]==-1)
return wiringPiFailure (WPI_FATAL, "wiringPiISR: pin not supported on Banana Pi (%d,%d)\n", pin,bcmGpioPin) ;
if(isH3()){
// All PA- and PG-pins support interrupts, the others don't
if(bcmGpioPin > 31 && bcmGpioPin < 192)
return wiringPiFailure (WPI_FATAL, "wiringPiISR: the specified pin does not support interrupts on this board (Allwinner H3) (%d,%d)\n", pin,bcmGpioPin) ;
}
else if(edge[bcmGpioPin]==-1)
return wiringPiFailure (WPI_FATAL, "wiringPiISR: pin not supported on Banana Pi (%d,%d)\n", pin,bcmGpioPin) ;
}
/*end 2014.08.19*/

Expand Down

0 comments on commit 336b916

Please sign in to comment.