summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2017-04-30 17:39:03 -0700
committerKeith Packard <keithp@keithp.com>2017-04-30 17:39:03 -0700
commit0f883aa1b1a1db61113489c260f44c09d5216bc7 (patch)
tree71917712b16232ec68391353449a9e92c065b80a /src
parent979a1b8d80189e56745316da3de9288ee32e102c (diff)
altos/telegps-v2.0: Battery ADC input is on PB1, not PA0
Rewire as needed. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src')
-rw-r--r--src/telegps-v2.0/ao_pins.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/telegps-v2.0/ao_pins.h b/src/telegps-v2.0/ao_pins.h
index 37a5fa39..71143bbc 100644
--- a/src/telegps-v2.0/ao_pins.h
+++ b/src/telegps-v2.0/ao_pins.h
@@ -56,11 +56,13 @@
/* ADC */
#define HAS_ADC 1
-#define AO_ADC_PIN0_PORT (&stm_gpioa)
-#define AO_ADC_PIN0_PIN 0
-#define AO_ADC_PIN0_CH 0
+#define AO_ADC_PIN0_PORT (&stm_gpiob)
+#define AO_ADC_PIN0_PIN 1
+#define AO_ADC_PIN0_CH 9
-#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_IOPAEN))
+#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_IOPBEN))
+
+#define ao_telemetry_battery_convert(a) ((a) << 3)
#define AO_NUM_ADC 1