summaryrefslogtreecommitdiff
path: root/src/cc1111
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2013-04-08 17:42:18 -0700
committerKeith Packard <keithp@keithp.com>2013-04-09 00:30:36 -0700
commit08eb1e3e1abb1aa4f5ea92b781a2ff8f480006c5 (patch)
treef512842c869e77bee53018e099a7e2dddf9e4245 /src/cc1111
parent6ba0df9b440b69bf5bc5f4e435b431adf303fee2 (diff)
altos: Monitor battery voltage on telebt
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/cc1111')
-rw-r--r--src/cc1111/ao_adc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cc1111/ao_adc.c b/src/cc1111/ao_adc.c
index bfdc418a..ed76179b 100644
--- a/src/cc1111/ao_adc.c
+++ b/src/cc1111/ao_adc.c
@@ -153,6 +153,15 @@ ao_adc_isr(void) __interrupt 1
#define GOT_ADC
#endif /* TELEFIRE_V_0_1 */
+#ifdef TELEBT_V_1_0
+ a = (uint8_t __xdata *) (&ao_data_ring[ao_data_head].adc.batt);
+ a[0] = ADCL;
+ a[1] = ADCH;
+ if (0)
+ ;
+#define GOT_ADC
+#endif
+
#ifndef GOT_ADC
#error No known ADC configuration set
#endif