blob: 71a650376f261fdf4fbd1b8280a989d1858d4eee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#ifndef PCINT_H_
#define PCINT_H_
#include "main.h"
#if IS_ATMEGAx8
# define USE_PCINT 1
# define IF_PCINT(...) __VA_ARGS__
#else
# define USE_PCINT 0
# define IF_PCINT(...) /* nothing */
#endif
typedef void (*pcint_callback_t)(void);
void pcint_clear_irq(uint8_t index);
void pcint_enable(uint8_t index, bool enable);
void pcint_register_callback(uint8_t index, pcint_callback_t cb);
#endif /* PCINT_H_ */
|