altos/stm: Make beeper driver support all possible tim234 configs
[fw/altos] / src / telefireeight-v1.0 / ao_pins.h
index 271d2cb..c15e06b 100644 (file)
 #define HAS_FLIGHT             0
 #define HAS_USB                        1
 #define HAS_BEEP               0
+#define BEEPER_TIMER           3
+#define BEEPER_CHANNEL         1
+#define BEEPER_PORT            (&stm_gpioc)
+#define BEEPER_PIN             6
 #define HAS_GPS                        0
 #define HAS_SERIAL_1           0
 #define HAS_ADC                        1
 #define AO_CC1200_INT_GPIO     2
 #define AO_CC1200_INT_GPIO_IOCFG       CC1200_IOCFG2
 
-#define LED_PER_LED            1
+#define HAS_LED                        1
 #define LED_TYPE               uint16_t
 
 /* Continuity leds 1-8 */
 #define LED_7_PORT             (&stm_gpioa)
 #define LED_7_PIN              10
 
-#define LED_PIN_CONTINUITY_0   0
-#define LED_PIN_CONTINUITY_1   1
-#define LED_PIN_CONTINUITY_2   2
-#define LED_PIN_CONTINUITY_3   3
-#define LED_PIN_CONTINUITY_4   4
-#define LED_PIN_CONTINUITY_5   5
-#define LED_PIN_CONTINUITY_6   6
-#define LED_PIN_CONTINUITY_7   7
+#define AO_LED_CONTINUITY(c)   (1 << (c))
+#define AO_LED_CONTINUITY_MASK (0xff)
 
 /* ARM */
 #define LED_8_PORT             (&stm_gpioe)
 #define LED_11_PORT            (&stm_gpioe)
 #define LED_11_PIN             6
 
-#define LED_PIN_GREEN          9
-#define LED_PIN_AMBER          10
-#define LED_PIN_RED            11
-
-#define AO_LED_CONTINUITY(c)   (1 << (c))
-#define AO_LED_CONTINUITY_MASK (0xff)
-
-#define AO_LED_ARMED           (1 << LED_PIN_ARMED)
-#define AO_LED_GREEN           (1 << LED_PIN_GREEN)
-#define AO_LED_AMBER           (1 << LED_PIN_AMBER)
-#define AO_LED_RED             (1 << LED_PIN_RED)
-
-#define LEDS_AVAILABLE         (0xfff)
+#define AO_LED_ARMED           AO_LED_8
+#define AO_LED_GREEN           AO_LED_9
+#define AO_LED_AMBER           AO_LED_10
+#define AO_LED_RED             AO_LED_11
 
 /* Alarm A */
 #define AO_SIREN
 #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