forked from Archive/PX4-Autopilot
aerofc: Enable I2C1 for external compass
For now it is only checking if there is a external HMC5883, if necessary more compass should be added and probe.
This commit is contained in:
parent
c49c3f469e
commit
8fb15f1de8
|
@ -270,7 +270,11 @@ then
|
|||
then
|
||||
fi
|
||||
|
||||
if hmc5883 -R 4 start
|
||||
if hmc5883 -I -R 4 start
|
||||
then
|
||||
fi
|
||||
|
||||
if hmc5883 -X start
|
||||
then
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -255,6 +255,11 @@
|
|||
* reset the bus to clear stuck slaves. They match the pin configuration,
|
||||
* but are normally-high GPIOs.
|
||||
*/
|
||||
#define GPIO_I2C1_SDA GPIO_I2C1_SDA_2
|
||||
#define GPIO_I2C1_SCL GPIO_I2C1_SCL_2
|
||||
#define GPIO_I2C1_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN9)
|
||||
#define GPIO_I2C1_SCL_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTB|GPIO_PIN8)
|
||||
|
||||
#define GPIO_I2C3_SDA GPIO_I2C3_SDA_1
|
||||
#define GPIO_I2C3_SCL GPIO_I2C3_SCL_1
|
||||
#define GPIO_I2C3_SDA_GPIO (GPIO_OUTPUT|GPIO_OPENDRAIN|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTC|GPIO_PIN9)
|
||||
|
|
|
@ -87,6 +87,7 @@
|
|||
* I2C3_SDL PA8 COMPASS_I2C3_SCL JP1-25,26
|
||||
*
|
||||
*/
|
||||
#define PX4_I2C_BUS_EXPANSION 1
|
||||
#define PX4_I2C_BUS_ONBOARD 3
|
||||
|
||||
#define PX4_I2C_OBDEV_HMC5883 0x1E
|
||||
|
|
Loading…
Reference in New Issue