34 #include "dev/button-sensor.h"
35 #include "dev/hwconf.h"
38 const struct sensors_sensor button_sensor;
40 static struct timer debouncetimer;
42 HWCONF_PIN(BUTTON, 2, 7);
43 HWCONF_IRQ(BUTTON, 2, 7);
46 interrupt(PORT2_VECTOR)
49 ENERGEST_ON(ENERGEST_TYPE_IRQ);
51 if(BUTTON_CHECK_IRQ()) {
54 sensors_changed(&button_sensor);
59 ENERGEST_OFF(ENERGEST_TYPE_IRQ);
69 configure(
int type,
int value)
73 BUTTON_IRQ_EDGE_SELECTD();
79 if(!BUTTON_IRQ_ENABLED()) {
97 return BUTTON_IRQ_ENABLED();
102 SENSORS_SENSOR(button_sensor, BUTTON_SENSOR,
103 value, configure, status);