Add files needed for slip rpl-border-router build.
This commit is contained in:
parent
6a5c8ff1c4
commit
e4fcd7ebd7
5 changed files with 279 additions and 1 deletions
45
platform/avr-raven/button-sensor.c
Normal file
45
platform/avr-raven/button-sensor.c
Normal file
|
@ -0,0 +1,45 @@
|
|||
/* Dummy sensor routine */
|
||||
|
||||
#include "lib/sensors.h"
|
||||
#include "dev/button-sensor.h"
|
||||
const struct sensors_sensor button_sensor;
|
||||
static int status(int type);
|
||||
struct sensors_sensor *sensors[1];
|
||||
unsigned char sensors_flags[1];
|
||||
|
||||
|
||||
static int
|
||||
value(int type)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
configure(int type, int c)
|
||||
{
|
||||
switch (type) {
|
||||
case SENSORS_ACTIVE:
|
||||
if (c) {
|
||||
if(!status(SENSORS_ACTIVE)) {
|
||||
}
|
||||
} else {
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
status(int type)
|
||||
{
|
||||
switch (type) {
|
||||
case SENSORS_ACTIVE:
|
||||
case SENSORS_READY:
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
SENSORS_SENSOR(button_sensor, BUTTON_SENSOR,
|
||||
value, configure, status);
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue