Updated to match the new sensors API
This commit is contained in:
parent
dd6922906c
commit
fe126bc90e
7 changed files with 7 additions and 205 deletions
|
@ -29,14 +29,14 @@
|
|||
* 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.1 2006/06/17 22:41:36 adamdunkels Exp $
|
||||
* $Id: vib-sensor.c,v 1.2 2010/01/14 15:38:56 adamdunkels Exp $
|
||||
*
|
||||
* -----------------------------------------------------------------
|
||||
*
|
||||
* Author : Adam Dunkels, Joakim Eriksson, Niclas Finne
|
||||
* Created : 2005-11-01
|
||||
* Updated : $Date: 2006/06/17 22:41:36 $
|
||||
* $Revision: 1.1 $
|
||||
* Updated : $Date: 2010/01/14 15:38:56 $
|
||||
* $Revision: 1.2 $
|
||||
*/
|
||||
|
||||
#include "dev/vib-sensor.h"
|
||||
|
@ -51,36 +51,6 @@ vib_sensor_changed(void)
|
|||
sensors_changed(&vib_sensor);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
irq(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
init(void)
|
||||
{
|
||||
vib = 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
activate(void)
|
||||
{
|
||||
vib = 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
deactivate(void)
|
||||
{
|
||||
vib = 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
active(void)
|
||||
{
|
||||
return vib;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static unsigned int
|
||||
value(int type)
|
||||
{
|
||||
|
@ -100,5 +70,4 @@ status(int type)
|
|||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
SENSORS_SENSOR(vib_sensor, VIB_SENSOR,
|
||||
init, irq, activate, deactivate, active,
|
||||
value, configure, status);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue