Adding the avr-rss2 platform based on AtMega256RFR2
This commit is contained in:
parent
d3980668ee
commit
ce8e87d60e
91 changed files with 9349 additions and 0 deletions
41
platform/avr-rss2/dev/button-sensor.c
Normal file
41
platform/avr-rss2/dev/button-sensor.c
Normal file
|
@ -0,0 +1,41 @@
|
|||
/* 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