34 #include "lib/sensors.h" 35 #include "dev/hwconf.h" 36 #include "dev/button-sensor.h" 37 #include "isr_compat.h" 41 static struct timer debouncetimer;
42 static int status(
int type);
44 HWCONF_PIN(BUTTON, 2, 5);
45 HWCONF_IRQ(BUTTON, 2, 5);
50 if(BUTTON_CHECK_IRQ()) {
67 configure(
int type,
int c)
72 if(!
status(SENSORS_ACTIVE)) {
74 BUTTON_IRQ_EDGE_SELECTD();
95 return BUTTON_IRQ_ENABLED();
SENSORS & button_sensor
Exports global symbols for the sensor API.
void timer_set(struct timer *t, clock_time_t interval)
Set a timer.
#define CLOCK_SECOND
A second, measured in system clock time.
int timer_expired(struct timer *t)
Check if a timer has expired.