35 #include "lib/sensors.h"
36 #include "dev/sky-sensors.h"
37 #include "dev/light-sensor.h"
41 #define INPUT_CHANNEL ((1 << INCH_4) | (1 << INCH_5))
42 #define INPUT_REFERENCE SREF_0
43 #define PHOTOSYNTHETIC_MEM ADC12MEM4
44 #define TOTAL_SOLAR_MEM ADC12MEM5
46 const struct sensors_sensor light_sensor;
54 case LIGHT_SENSOR_PHOTOSYNTHETIC:
55 return PHOTOSYNTHETIC_MEM;
58 case LIGHT_SENSOR_TOTAL_SOLAR:
59 return TOTAL_SOLAR_MEM;
67 return sky_sensors_status(INPUT_CHANNEL, type);
71 configure(
int type,
int c)
73 return sky_sensors_configure(INPUT_CHANNEL, INPUT_REFERENCE, type, c);
76 SENSORS_SENSOR(light_sensor,
"Light", value, configure, status);