33 #include "lib/sensors.h" 34 #include "dev/hwconf.h" 35 #include "dev/button-sensor.h" 36 #include "isr_compat.h" 40 static struct timer debouncetimer;
41 static int status(
int type);
43 HWCONF_PIN(BUTTON, 2, 7);
44 HWCONF_IRQ(BUTTON, 2, 7);
49 if(BUTTON_CHECK_IRQ()) {
66 configure(
int type,
int c)
71 if(!
status(SENSORS_ACTIVE)) {
73 BUTTON_IRQ_EDGE_SELECTD();
94 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.