mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-11-08 23:08:29 +00:00
61 lines
1.4 KiB
C
61 lines
1.4 KiB
C
|
|
#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);
|