wiringPi对于中断的相关的设置函数是在箭头所在的链接。
With a newer kernel patched with the GPIO interrupt handling code, you can now wait for an interrupt in your program. This frees up the processor to do other tasks while you’re waiting for that interrupt. The GPIO can be set to interrupt on a rising, falling or both edges of the incoming signal.
打了一个更新的补丁在GPIO中断控制代码,你现在可以在你的项目里面使用中断了。当你在等待中断的时候,它释放了处理器去做其他任务。GPIO可以设置在高电平,低电平或者是上升,下降沿的信号。
Note: Jan 2013: The waitForInterrupt() function is deprecated – you should use the newer and easier to use wiringPiISR() function below.
标注:2013一月:函数waitForInterrupt()被弃用,你可以使用更新和更容易的函数wiringPiISR()
里面只有一个函数:int wiringPiISR (int pin, int edgeType, void (*function)(void)) ;
This function registers a function to received interrupts