40 #include "dev/battery-sensor.h"
44 #define BAT_MONITOR_PORT PORTF
45 #define BAT_MONITOR_PIN_MASK _BV(1)
46 #define BAT_MONITOR_PORT_DDR DDRF
47 #define BAT_MONITOR_ADC_CHANNEL 30
49 const struct sensors_sensor battery_sensor;
50 static uint8_t active;
59 BAT_MONITOR_PORT |= BAT_MONITOR_PIN_MASK;
60 BAT_MONITOR_PORT_DDR |= BAT_MONITOR_PIN_MASK;
74 return get_adc(BAT_MONITOR_ADC_CHANNEL);
78 configure(
int type,
int c)
102 SENSORS_SENSOR(battery_sensor, BATTERY_SENSOR,
103 value, configure, status);