aboutsummaryrefslogtreecommitdiffstats
path: root/src/wiring/ext_interrupts.h
blob: d6fb23fafe53359ed2d0e0f0a820562bf3e3a5e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef _EXT_INTERRUPTS_H_
#define _EXT_INTERRUPTS_H_

#include "exti.h"

#define RISING  EXTI_RISING
#define FALLING EXTI_FALLING
#define CHANGE  EXTI_RISING_FALLING


enum ExtInterruptError {
    EXT_INTERRUPT_INVALID_PIN =      (-1),
    EXT_INTERRUPT_INVALID_FUNCTION = (-2),
    EXT_INTERRUPT_INVALID_MODE =     (-3),

};

#ifdef __cplusplus
extern "C"{
#endif

int attachInterrupt(uint8_t, void ((*)(void)), uint8_t);
int detachInterrupt(uint8_t);

#ifdef __cplusplus
}
#endif


#endif