diff options
author | Keith Packard <keithp@keithp.com> | 2011-10-23 14:51:32 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-10-23 14:51:32 -0700 |
commit | f70553106707e3496d07eecb83f0c0a1acad7f77 (patch) | |
tree | 23f9916f733d88cffbc2304ac9a517b1ea012044 /src/core | |
parent | 7e7a10c06a0486e9f869e361e46f2c98db9897b0 (diff) |
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 <keithp@keithp.com>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/ao.h | 15 |
1 files changed, 15 insertions, 0 deletions
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_ */ |