Updated to new sensors API
This commit is contained in:
parent
757ca59511
commit
08f06d8039
4 changed files with 21 additions and 28 deletions
|
@ -10,22 +10,22 @@ button_press(void)
|
|||
sensors_changed(&button_sensor);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static unsigned int
|
||||
static int
|
||||
value(int type)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
configure(int type, void *c)
|
||||
configure(int type, int value)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void *
|
||||
static int
|
||||
status(int type)
|
||||
{
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
SENSORS_SENSOR(button_sensor, BUTTON_SENSOR,
|
||||
|
|
|
@ -13,22 +13,22 @@ pir_sensor_changed(int strength)
|
|||
sensors_changed(&pir_sensor);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static unsigned int
|
||||
static int
|
||||
value(int type)
|
||||
{
|
||||
return pir_value;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
configure(int type, void *c)
|
||||
configure(int type, int c)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void *
|
||||
static int
|
||||
status(int type)
|
||||
{
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
SENSORS_SENSOR(pir_sensor, PIR_SENSOR,
|
||||
|
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* This file is part of the Contiki operating system.
|
||||
*
|
||||
* @(#)$Id: radio-sensor.c,v 1.2 2010/01/14 15:38:56 adamdunkels Exp $
|
||||
* @(#)$Id: radio-sensor.c,v 1.3 2010/02/23 18:43:43 adamdunkels Exp $
|
||||
*/
|
||||
|
||||
#include "lib/sensors.h"
|
||||
|
@ -36,31 +36,25 @@
|
|||
|
||||
const struct sensors_sensor radio_sensor;
|
||||
|
||||
unsigned int radio_sensor_signal;
|
||||
unsigned int radio_sensor_signal = 0;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
init(void)
|
||||
{
|
||||
radio_sensor_signal = 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static unsigned int
|
||||
static int
|
||||
value(int type)
|
||||
{
|
||||
return radio_sensor_signal;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
configure(int type, void *c)
|
||||
configure(int type, int c)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void *
|
||||
static int
|
||||
status(int type)
|
||||
{
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
SENSORS_SENSOR(radio_sensor, RADIO_SENSOR,
|
||||
|
|
|
@ -29,20 +29,19 @@
|
|||
* This file is part of the Configurable Sensor Network Application
|
||||
* Architecture for sensor nodes running the Contiki operating system.
|
||||
*
|
||||
* $Id: vib-sensor.c,v 1.2 2010/01/14 15:38:56 adamdunkels Exp $
|
||||
* $Id: vib-sensor.c,v 1.3 2010/02/23 18:43:43 adamdunkels Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne
|
||||
* Created : 2005-11-01
|
||||
* Updated : $Date: 2010/01/14 15:38:56 $
|
||||
* $Revision: 1.2 $
|
||||
* Updated : $Date: 2010/02/23 18:43:43 $
|
||||
* $Revision: 1.3 $
|
||||
*/
|
||||
|
||||
#include "dev/vib-sensor.h"
|
||||
|
||||
const struct sensors_sensor vib_sensor;
|
||||
static unsigned int vib;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
|
@ -51,22 +50,22 @@ vib_sensor_changed(void)
|
|||
sensors_changed(&vib_sensor);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static unsigned int
|
||||
static int
|
||||
value(int type)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
configure(int type, void *c)
|
||||
configure(int type, int c)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void *
|
||||
static int
|
||||
status(int type)
|
||||
{
|
||||
return NULL;
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
SENSORS_SENSOR(vib_sensor, VIB_SENSOR,
|
||||
|
|
Loading…
Reference in a new issue