summaryrefslogtreecommitdiff
path: root/src/telefireeight-v1.0
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2018-05-31 22:39:45 -0700
committerKeith Packard <keithp@keithp.com>2018-05-31 22:39:45 -0700
commit99642f9c4f89aa5577376a9cd118e7cff26e2762 (patch)
tree724114801ee0e0697e829abe342d6e8b43fe1c27 /src/telefireeight-v1.0
parentab22c56ca02db87a84b6950c024a90b086f5ce28 (diff)
altos/telefire*: Do voltage tests in decivolts instead of ADC units
This requires that each pad device specify the ADC reference voltage and all relevant voltage divider resistor values explicitly so that the ADC values can be converted to decivolts and compared with one another. This should be easier to understand in the future when reading the code. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'src/telefireeight-v1.0')
-rw-r--r--src/telefireeight-v1.0/ao_pins.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/telefireeight-v1.0/ao_pins.h b/src/telefireeight-v1.0/ao_pins.h
index 271d2cbe..15e1fa11 100644
--- a/src/telefireeight-v1.0/ao_pins.h
+++ b/src/telefireeight-v1.0/ao_pins.h
@@ -295,16 +295,23 @@
#define AO_ADC_SQ9 AO_ADC_PYRO
#define AO_ADC_SQ10 AO_ADC_BATT
+#define AO_ADC_REFERENCE_DV 33
+
#define AO_ADC_RCC_AHBENR ((1 << STM_RCC_AHBENR_GPIOAEN) | \
(1 << STM_RCC_AHBENR_GPIOBEN) | \
(1 << STM_RCC_AHBENR_GPIOCEN))
-#define AO_PYRO_R_PYRO_SENSE 200
-#define AO_PYRO_R_SENSE_GND 22
-#define AO_FIRE_R_POWER_FET 0
-#define AO_FIRE_R_FET_SENSE 200
-#define AO_FIRE_R_SENSE_GND 22
+#define AO_PAD_R_V_BATT_BATT_SENSE 200
+#define AO_PAD_R_BATT_SENSE_GND 22
+
+#define AO_PAD_R_V_BATT_V_PYRO 200
+#define AO_PAD_R_V_PYRO_PYRO_SENSE 200
+#define AO_PAD_R_PYRO_SENSE_GND 22
+
+#undef AO_PAD_R_V_PYRO_IGNITER
+#define AO_PAD_R_IGNITER_IGNITER_SENSE 200
+#define AO_PAD_R_IGNITER_SENSE_GND 22
#define HAS_ADC_TEMP 0