34 #include "lib/sensors.h"
35 #include "dev/sky-sensors.h"
36 #include "dev/light-sensor.h"
37 #include "dev/potentiometer-sensor.h"
43 #define INPUT_CHANNEL (1 << INCH_4)
46 #ifndef INPUT_REFERENCE
47 #define INPUT_REFERENCE SREF_0
50 #ifdef POTENTIOMETER_MEM
51 #define PHOTOSYNTHETIC_MEM POTENTIOMETER_MEM
52 #define TOTAL_SOLAR_MEM POTENTIOMETER_MEM
54 #define PHOTOSYNTHETIC_MEM ADC12MEM4
55 #define TOTAL_SOLAR_MEM ADC12MEM4
59 const struct sensors_sensor light_sensor;
67 case LIGHT_SENSOR_PHOTOSYNTHETIC:
68 return PHOTOSYNTHETIC_MEM;
71 case LIGHT_SENSOR_TOTAL_SOLAR:
72 return TOTAL_SOLAR_MEM;
80 return sky_sensors_status(INPUT_CHANNEL, type);
84 configure(
int type,
int c)
86 return sky_sensors_configure(INPUT_CHANNEL, INPUT_REFERENCE, type, c);
89 SENSORS_SENSOR(light_sensor,
"Light", value, configure, status);