| 1 | /** |
| 2 | * Interrupt implementation wrapped from pigpio library |
| 3 | */ |
| 4 | #include <pigpio.h> |
| 5 | #include "interrupt.h" |
| 6 | |
| 7 | #ifdef __cplusplus |
| 8 | extern "C" { |
| 9 | #endif |
| 10 | |
| 11 | int attachInterrupt(int pin, int mode, void (*function)(void)) |
| 12 | { |
| 13 | gpioInitialise(); |
| 14 | return gpioSetISRFunc(pin, mode, 0, (gpioISRFunc_t)function); |
| 15 | } |
| 16 | |
| 17 | int detachInterrupt(int pin) |
| 18 | { |
| 19 | return gpioSetISRFunc(pin, 0, 0, NULL); |
| 20 | } |
| 21 | |
| 22 | void rfNoInterrupts() |
| 23 | { |
| 24 | } |
| 25 | |
| 26 | void rfInterrupts() |
| 27 | { |
| 28 | } |
| 29 | |
| 30 | #ifdef __cplusplus |
| 31 | } |
| 32 | #endif |