36 #include "lib/sensors.h"
37 #include "dev/button-sensor.h"
45 static struct timer debouncetimer;
46 static int status(
int type);
63 configure(
int type,
int c)
68 if(!status(SENSORS_ACTIVE)) {
88 return bit_is_set(*CRM_WU_CNTL, 20);
94 value, configure, status);
void timer_set(struct timer *t, clock_time_t interval)
Set a timer.
const struct sensors_sensor button_sensor
Copyright (c) 2014, Analog Devices, Inc.
#define CLOCK_SECOND
A second, measured in system clock time.
static int value(int type, nrf_drv_gpiote_pin_t pin)
Return current state of a button.
int timer_expired(struct timer *t)
Check if a timer has expired.