altos/telegps-v2.0: Battery ADC input is on PB1, not PA0
authorKeith Packard <keithp@keithp.com>
Mon, 1 May 2017 00:39:03 +0000 (17:39 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 1 May 2017 00:39:03 +0000 (17:39 -0700)
Rewire as needed.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/telegps-v2.0/ao_pins.h

index 37a5fa3..71143bb 100644 (file)
 /* 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