mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 12:53:34 +08:00
mpu9250 allow a 2nd internal spi instance and remove px4fmu-v4 fake external (#9386)
This commit is contained in:
@@ -133,7 +133,6 @@
|
||||
#define PX4_SPI_BUS_SENSORS 1
|
||||
#define PX4_SPI_BUS_RAMTRON 2
|
||||
#define PX4_SPI_BUS_BARO PX4_SPI_BUS_RAMTRON
|
||||
#define PX4_SPI_BUS_EXT 1
|
||||
|
||||
/* Use these in place of the uint32_t enumeration to select a specific SPI device on SPI1 */
|
||||
#define PX4_SPIDEV_GYRO PX4_MK_SPI_SEL(PX4_SPI_BUS_SENSORS, 1)
|
||||
@@ -148,7 +147,7 @@
|
||||
#define PX4_SPIDEV_ICM_20602 PX4_MK_SPI_SEL(PX4_SPI_BUS_SENSORS, 11)
|
||||
#define PX4_SPIDEV_BMI055_ACC PX4_MK_SPI_SEL(PX4_SPI_BUS_SENSORS, 12)
|
||||
#define PX4_SPIDEV_BMI055_GYR PX4_MK_SPI_SEL(PX4_SPI_BUS_SENSORS, 13)
|
||||
#define PX4_SPIDEV_EXT_MPU PX4_MK_SPI_SEL(PX4_SPI_BUS_SENSORS, 14)
|
||||
#define PX4_SPIDEV_MPU2 PX4_MK_SPI_SEL(PX4_SPI_BUS_SENSORS, 14)
|
||||
|
||||
/* onboard MS5611 and FRAM are both on bus SPI2
|
||||
* spi_dev_e:SPIDEV_FLASH has the value 2 and is used in the NuttX ramtron driver
|
||||
|
||||
@@ -121,7 +121,7 @@ __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, uint32_t devid, bool s
|
||||
case PX4_SPIDEV_ICM_20602:
|
||||
case PX4_SPIDEV_ICM_20608:
|
||||
case PX4_SPIDEV_BMI055_ACC:
|
||||
case PX4_SPIDEV_EXT_MPU:
|
||||
case PX4_SPIDEV_MPU2:
|
||||
/* Making sure the other peripherals are not selected */
|
||||
px4_arch_gpiowrite(GPIO_SPI1_CS_PORTC_PIN2, 1);
|
||||
px4_arch_gpiowrite(GPIO_SPI1_CS_PORTC_PIN15, !selected);
|
||||
@@ -237,6 +237,4 @@ __EXPORT void board_spi_reset(int ms)
|
||||
stm32_configgpio(GPIO_SPI1_SCK);
|
||||
stm32_configgpio(GPIO_SPI1_MISO);
|
||||
stm32_configgpio(GPIO_SPI1_MOSI);
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user