Import of the contiki-2.x development code from the SICS internal CVS server
This commit is contained in:
commit
c9e808d638
671 changed files with 95332 additions and 0 deletions
60
platform/netsim/dev/button-sensor.c
Normal file
60
platform/netsim/dev/button-sensor.c
Normal file
|
@ -0,0 +1,60 @@
|
|||
|
||||
#include "dev/button-sensor.h"
|
||||
|
||||
const struct sensors_sensor button_sensor;
|
||||
|
||||
/*---------------------------------------------------------------------------*/
|
||||
void
|
||||
button_press(void)
|
||||
{
|
||||
sensors_changed(&button_sensor);
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
init(void)
|
||||
{
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
irq(void)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
activate(void)
|
||||
{
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void
|
||||
deactivate(void)
|
||||
{
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
active(void)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static unsigned int
|
||||
value(int type)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static int
|
||||
configure(int type, void *c)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
static void *
|
||||
status(int type)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
/*---------------------------------------------------------------------------*/
|
||||
SENSORS_SENSOR(button_sensor, BUTTON_SENSOR,
|
||||
init, irq, activate, deactivate, active,
|
||||
value, configure, status);
|
Loading…
Add table
Add a link
Reference in a new issue