34#include "lib/sensors.h"
35#include "dev/sky-sensors.h"
36#include "dev/light-sensor.h"
40#define INPUT_CHANNEL ((1 << INCH_4) | (1 << INCH_5))
41#define INPUT_REFERENCE SREF_0
42#define PHOTOSYNTHETIC_MEM ADC12MEM4
43#define TOTAL_SOLAR_MEM ADC12MEM5
45const struct sensors_sensor light_sensor;
53 case LIGHT_SENSOR_PHOTOSYNTHETIC:
54 return PHOTOSYNTHETIC_MEM;
57 case LIGHT_SENSOR_TOTAL_SOLAR:
58 return TOTAL_SOLAR_MEM;
66 return sky_sensors_status(INPUT_CHANNEL, type);
70configure(
int type,
int c)
72 return sky_sensors_configure(INPUT_CHANNEL, INPUT_REFERENCE, type, c);
75SENSORS_SENSOR(light_sensor,
"Light", value, configure, status);