35 #include "lib/sensors.h"
36 #include "dev/button-sensor.h"
40 #define JOYSTICK_PUSH (!(P5 & BIT(5)))
41 #define JOYSTICK_RIGHT (!(P5 & BIT(4)))
42 #define JOYSTICK_DOWN (!(P5 & BIT(3)))
43 #define JOYSTICK_LEFT (!(P5 & BIT(2)))
44 #define JOYSTICK_UP (!(P5 & BIT(1)))
54 configure(
int type,
int c)
74 value, configure, status);
const struct sensors_sensor button_sensor
Copyright (c) 2014, Analog Devices, Inc.
static int value(int type, nrf_drv_gpiote_pin_t pin)
Return current state of a button.