mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-20 21:13:33 +08:00
aerofc: Power on sensors
MPU6500, MS5611 and HMC5883 only power on when GPIO_SENSORS_POWER is set.
This commit is contained in:
committed by
Lorenz Meier
parent
7ced5a1b6f
commit
51f85858f2
@@ -129,7 +129,8 @@ __END_DECLS
|
||||
|
||||
__EXPORT void stm32_boardinitialize(void)
|
||||
{
|
||||
|
||||
/* turn sensors on */
|
||||
stm32_configgpio(GPIO_SENSORS_POWER);
|
||||
|
||||
/* configure SPI interfaces */
|
||||
stm32_spiinitialize();
|
||||
|
||||
@@ -71,6 +71,8 @@
|
||||
#define GPIO_BLUE_LED GPIO_LED1
|
||||
#define GPIO_RED_LED GPIO_LED2
|
||||
|
||||
#define GPIO_SENSORS_POWER (GPIO_OUTPUT|GPIO_PUSHPULL|GPIO_SPEED_50MHz|GPIO_OUTPUT_SET|GPIO_PORTD|GPIO_PIN13)
|
||||
|
||||
/*
|
||||
* I2C busses
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user