1
2 #ifndef __NWBUTTON_H
3 #define __NWBUTTON_H
4
5
6
7
8
9
10 #ifdef __NWBUTTON_C
11
12
13
14 #define NUM_PRESSES_REBOOT 2
15 #define BUTTON_DELAY 30
16 #define VERSION "0.3"
17 #define BUTTON_MINOR 158
18
19
20
21 struct button_callback {
22 void (*callback) (void);
23 int count;
24 };
25
26
27
28 static void button_sequence_finished(struct timer_list *unused);
29 static irqreturn_t button_handler (int irq, void *dev_id);
30 int button_init (void);
31 int button_add_callback (void (*callback) (void), int count);
32 int button_del_callback (void (*callback) (void));
33 static void button_consume_callbacks (int bpcount);
34
35 #else
36
37 extern int button_add_callback (void (*callback) (void), int count);
38 extern int button_del_callback (void (*callback) (void));
39
40 #endif
41 #endif