initial
This commit is contained in:
BIN
snippets/test1/test1
Executable file
BIN
snippets/test1/test1
Executable file
Binary file not shown.
17
snippets/test1/test1.c
Normal file
17
snippets/test1/test1.c
Normal 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);
|
||||
}
|
Reference in New Issue
Block a user