summaryrefslogtreecommitdiff
path: root/src/stm-demo/ao_pins.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2012-04-07 20:35:17 -0700
committerKeith Packard <keithp@keithp.com>2012-04-07 20:35:17 -0700
commitf7cfbbce2b94b5ac0094a0e34e1766fe1ceb12c8 (patch)
tree06600d60b389ca725051eccd1b7233e6cd08391f /src/stm-demo/ao_pins.h
parent98aa481741b8fbc617545beda3d295b53de90716 (diff)
altos: Show temperature in stm-demo
Use the ADC to show current temperature Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/stm-demo/ao_pins.h')
-rw-r--r--src/stm-demo/ao_pins.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/stm-demo/ao_pins.h b/src/stm-demo/ao_pins.h
index fecd8cda..42f4123d 100644
--- a/src/stm-demo/ao_pins.h
+++ b/src/stm-demo/ao_pins.h
@@ -119,6 +119,7 @@ struct ao_adc {
uint16_t tick;
int16_t idd;
int16_t temp;
+ int16_t vref;
};
#define AO_ADC_IDD 4
@@ -127,13 +128,15 @@ struct ao_adc {
#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_GPIOAEN))
#define AO_ADC_TEMP 16
+#define AO_ADC_VREF 17
#define HAS_ADC_TEMP 1
-#define AO_NUM_ADC 2
+#define AO_NUM_ADC 3
#define AO_ADC_SQ1 AO_ADC_IDD
#define AO_ADC_SQ2 AO_ADC_TEMP
+#define AO_ADC_SQ3 AO_ADC_VREF
#endif /* _AO_PINS_H_ */