This commit is contained in:
Wolfgang Hottgenroth
2019-10-04 07:28:32 +01:00
commit 2a008be563
3 changed files with 91 additions and 0 deletions

17
snippets/test1/test1.c Normal file
View File

@ -0,0 +1,17 @@
#include <wiringPi.h>
void isr() {
static int t = 0;
digitalWrite(16, t);
t = ! t;
}
int main (void) {
wiringPiSetupGpio() ;
pinMode(16, OUTPUT);
pinMode(19, INPUT);
wiringPiISR(19, INT_EDGE_FALLING, isr);
while(1);
}