altos/easymega-v3.0: Update i2c pin usage
authorKeith Packard <keithp@keithp.com>
Sat, 24 Feb 2024 20:46:17 +0000 (12:46 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 24 Feb 2024 20:46:17 +0000 (12:46 -0800)
Found an errata which means we had to swap which i2c to use with the
mag sensor. Swap the mag sensor and fire_c/fire_d.

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

index 1aea7b212bf40d4b2c20fa8d9c5bb7b43d4ab386..8f0706ebc1b61ac4f691deab98c6560c809957e1 100644 (file)
 #define SPI_2_PB13_PB14_PB15   1       /* Flash, IMU, Companion */
 #define SPI_2_MODE_OUTPUT      STM_GPIO_CR_MODE_OUTPUT_50MHZ
 
-#define HAS_I2C_1              1
-#define I2C_1_PB8_PB9          1
+#define HAS_I2C_1              0
+#define I2C_1_PB8_PB9          0
 
-#define HAS_I2C_2              0
-#define I2C_2_PB10_PB11                0
+#define HAS_I2C_2              1
+#define I2C_2_PB10_PB11                1
 
 #define PACKET_HAS_SLAVE       0
 #define PACKET_HAS_MASTER      0
 
 /* Pyro C */
 #define AO_PYRO_PORT_2 (&stm_gpiob)
-#define AO_PYRO_PIN_2  11
+#define AO_PYRO_PIN_2  9
 
 /* Pyro D */
 #define AO_PYRO_PORT_3 (&stm_gpiob)
-#define AO_PYRO_PIN_3  10
+#define AO_PYRO_PIN_3  8
 
 /* Drogue */
 #define AO_IGNITER_DROGUE_PORT (&stm_gpioa)
@@ -321,7 +321,7 @@ struct ao_adc {
 
 #define HAS_MMC5983            1
 #define MMC5983_I2C            1
-#define AO_MMC5983_I2C_INDEX   STM_I2C_INDEX(1)
+#define AO_MMC5983_I2C_INDEX   STM_I2C_INDEX(2)
 
 #define ao_mmc5983_along(m)            (-(m)->y)
 #define ao_mmc5983_across(m)           ((m)->x)
@@ -338,12 +338,6 @@ struct ao_adc {
 #define AO_ADXL375_CS_PORT     (&stm_gpioc)
 #define AO_ADXL375_CS_PIN      12
 
-#define AO_ADXL375_INT1_PORT   (&stm_gpiob)
-#define AO_ADXL375_INT1_PIN    8
-
-#define AO_ADXL375_INT2_PORT   (&stm_gpiob)
-#define AO_ADXL375_INT2_PIN    9
-
 #define AO_ADXL375_AXIS                x
 #define AO_ADXL375_INVERT      1