Add ICM20602 to Pixracer config

This commit is contained in:
Lorenz Meier 2016-12-28 13:08:39 +01:00
parent d0d6b39602
commit ece8d85860
2 changed files with 4 additions and 0 deletions

View File

@ -130,6 +130,7 @@
#define PX4_SPIDEV_LIS 7
#define PX4_SPIDEV_BMI 8
#define PX4_SPIDEV_BMA 9
#define PX4_SPIDEV_ICM_20602 10
/* 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

View File

@ -95,6 +95,9 @@ __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
switch (devid) {
case PX4_SPIDEV_ICM:
/* intended fallthrough */
case PX4_SPIDEV_ICM_20602:
/* Making sure the other peripherals are not selected */
px4_arch_gpiowrite(GPIO_SPI_CS_BMI160, 1);
px4_arch_gpiowrite(GPIO_SPI_CS_MPU9250, 1);