Contiki 2.5
button-sensor.c
1 
2 #include "dev/button-sensor.h"
3 
4 const struct sensors_sensor button_sensor;
5 
6 /*---------------------------------------------------------------------------*/
7 void
8 button_press(void)
9 {
10  sensors_changed(&button_sensor);
11 }
12 /*---------------------------------------------------------------------------*/
13 static unsigned int
14 value(int type)
15 {
16  return 0;
17 }
18 /*---------------------------------------------------------------------------*/
19 static int
20 configure(int type, void *c)
21 {
22  return 0;
23 }
24 /*---------------------------------------------------------------------------*/
25 static void *
26 status(int type)
27 {
28  return NULL;
29 }
30 /*---------------------------------------------------------------------------*/
31 SENSORS_SENSOR(button_sensor, BUTTON_SENSOR,
32  value, configure, status);