Krolyxon
Commit 1d55752

Branches

Tags

Refs →

orion-rf.piolibdepsesp32-s3-n16r8RF24utilitypigpiointerrupt.cpp

32 lines · 462 B · C++

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