Skip to content

Commit d9140ea

Browse files
committed
altos/easymega-v3.0: Update i2c pin usage
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 <[email protected]>
1 parent bb3bfea commit d9140ea

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

src/easymega-v3.0/ao_pins.h

+7-13
Original file line numberDiff line numberDiff line change
@@ -85,11 +85,11 @@
8585
#define SPI_2_PB13_PB14_PB15 1 /* Flash, IMU, Companion */
8686
#define SPI_2_MODE_OUTPUT STM_GPIO_CR_MODE_OUTPUT_50MHZ
8787

88-
#define HAS_I2C_1 1
89-
#define I2C_1_PB8_PB9 1
88+
#define HAS_I2C_1 0
89+
#define I2C_1_PB8_PB9 0
9090

91-
#define HAS_I2C_2 0
92-
#define I2C_2_PB10_PB11 0
91+
#define HAS_I2C_2 1
92+
#define I2C_2_PB10_PB11 1
9393

9494
#define PACKET_HAS_SLAVE 0
9595
#define PACKET_HAS_MASTER 0
@@ -134,11 +134,11 @@
134134

135135
/* Pyro C */
136136
#define AO_PYRO_PORT_2 (&stm_gpiob)
137-
#define AO_PYRO_PIN_2 11
137+
#define AO_PYRO_PIN_2 9
138138

139139
/* Pyro D */
140140
#define AO_PYRO_PORT_3 (&stm_gpiob)
141-
#define AO_PYRO_PIN_3 10
141+
#define AO_PYRO_PIN_3 8
142142

143143
/* Drogue */
144144
#define AO_IGNITER_DROGUE_PORT (&stm_gpioa)
@@ -321,7 +321,7 @@ struct ao_adc {
321321

322322
#define HAS_MMC5983 1
323323
#define MMC5983_I2C 1
324-
#define AO_MMC5983_I2C_INDEX STM_I2C_INDEX(1)
324+
#define AO_MMC5983_I2C_INDEX STM_I2C_INDEX(2)
325325

326326
#define ao_mmc5983_along(m) (-(m)->y)
327327
#define ao_mmc5983_across(m) ((m)->x)
@@ -338,12 +338,6 @@ struct ao_adc {
338338
#define AO_ADXL375_CS_PORT (&stm_gpioc)
339339
#define AO_ADXL375_CS_PIN 12
340340

341-
#define AO_ADXL375_INT1_PORT (&stm_gpiob)
342-
#define AO_ADXL375_INT1_PIN 8
343-
344-
#define AO_ADXL375_INT2_PORT (&stm_gpiob)
345-
#define AO_ADXL375_INT2_PIN 9
346-
347341
#define AO_ADXL375_AXIS x
348342
#define AO_ADXL375_INVERT 1
349343

0 commit comments

Comments
 (0)