0001
0002 #ifndef __NWBUTTON_H
0003 #define __NWBUTTON_H
0004
0005
0006
0007
0008
0009
0010 #ifdef __NWBUTTON_C
0011
0012
0013
0014 #define NUM_PRESSES_REBOOT 2
0015 #define BUTTON_DELAY 30
0016 #define VERSION "0.3"
0017
0018
0019
0020 struct button_callback {
0021 void (*callback) (void);
0022 int count;
0023 };
0024
0025
0026
0027 static void button_sequence_finished(struct timer_list *unused);
0028 static irqreturn_t button_handler (int irq, void *dev_id);
0029 int button_init (void);
0030 int button_add_callback (void (*callback) (void), int count);
0031 int button_del_callback (void (*callback) (void));
0032 static void button_consume_callbacks (int bpcount);
0033
0034 #else
0035
0036 extern int button_add_callback (void (*callback) (void), int count);
0037 extern int button_del_callback (void (*callback) (void));
0038
0039 #endif
0040 #endif