mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-24 07:33:34 +08:00
Add ICM20602 to Pixracer config
This commit is contained in:
@@ -130,6 +130,7 @@
|
|||||||
#define PX4_SPIDEV_LIS 7
|
#define PX4_SPIDEV_LIS 7
|
||||||
#define PX4_SPIDEV_BMI 8
|
#define PX4_SPIDEV_BMI 8
|
||||||
#define PX4_SPIDEV_BMA 9
|
#define PX4_SPIDEV_BMA 9
|
||||||
|
#define PX4_SPIDEV_ICM_20602 10
|
||||||
|
|
||||||
/* onboard MS5611 and FRAM are both on bus SPI2
|
/* 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
|
* spi_dev_e:SPIDEV_FLASH has the value 2 and is used in the NuttX ramtron driver
|
||||||
|
|||||||
@@ -95,6 +95,9 @@ __EXPORT void stm32_spi1select(FAR struct spi_dev_s *dev, enum spi_dev_e devid,
|
|||||||
|
|
||||||
switch (devid) {
|
switch (devid) {
|
||||||
case PX4_SPIDEV_ICM:
|
case PX4_SPIDEV_ICM:
|
||||||
|
|
||||||
|
/* intended fallthrough */
|
||||||
|
case PX4_SPIDEV_ICM_20602:
|
||||||
/* Making sure the other peripherals are not selected */
|
/* Making sure the other peripherals are not selected */
|
||||||
px4_arch_gpiowrite(GPIO_SPI_CS_BMI160, 1);
|
px4_arch_gpiowrite(GPIO_SPI_CS_BMI160, 1);
|
||||||
px4_arch_gpiowrite(GPIO_SPI_CS_MPU9250, 1);
|
px4_arch_gpiowrite(GPIO_SPI_CS_MPU9250, 1);
|
||||||
|
|||||||
Reference in New Issue
Block a user