From f70553106707e3496d07eecb83f0c0a1acad7f77 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Sun, 23 Oct 2011 14:51:32 -0700 Subject: altos: Add battery voltage sampling driver For devices without a full ADC compliment, this just samples the battery pin and converts to mV. Signed-off-by: Keith Packard --- src/core/ao.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/core/ao.h') diff --git a/src/core/ao.h b/src/core/ao.h index 43d4e0e3..558d0e38 100644 --- a/src/core/ao.h +++ b/src/core/ao.h @@ -1858,4 +1858,19 @@ ao_log_single(void); void ao_terraui_init(void); +/* + * ao_battery.c + */ + +#ifdef BATTERY_PIN +void +ao_battery_isr(void) ao_arch_interrupt(1); + +uint16_t +ao_battery_get(void); + +void +ao_battery_init(void); +#endif /* BATTERY_PIN */ + #endif /* _AO_H_ */ -- cgit v1.2.3