From dad5224206a12feac6d19f16eea6bd1c708fc610 Mon Sep 17 00:00:00 2001 From: Sergej Scheiermann Date: Fri, 17 Feb 2017 15:54:14 +0100 Subject: [PATCH] bmi055 added to start-up script --- ROMFS/px4fmu_common/init.d/rc.sensors | 15 +++++++++++++++ src/platforms/px4_spi.h | 3 +-- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/ROMFS/px4fmu_common/init.d/rc.sensors b/ROMFS/px4fmu_common/init.d/rc.sensors index af3195e7f1..82f6c7a889 100644 --- a/ROMFS/px4fmu_common/init.d/rc.sensors +++ b/ROMFS/px4fmu_common/init.d/rc.sensors @@ -216,6 +216,21 @@ then if bmi160 start then fi + + # Start either ICM2060X or BMI055. They are both connected to the same SPI bus and use the same + # chip select pin. There are different boards with either one of them and the WHO_AM_I register + # will prevent the incorrect driver from a successful initialization. + + # Internal SPI bus BMI055_ACC + if bmi055 -A start + then + fi + + # Internal SPI bus BMI055_GYR + if bmi055 -G start + then + fi + fi if ver hwcmp PX4FMU_V1 diff --git a/src/platforms/px4_spi.h b/src/platforms/px4_spi.h index 049f2154a5..6936ccfd28 100644 --- a/src/platforms/px4_spi.h +++ b/src/platforms/px4_spi.h @@ -15,8 +15,7 @@ enum spi_dev_e { SPIDEV_EXPANDER, /* Select SPI I/O expander device */ SPIDEV_MUX, /* Select SPI multiplexer device */ SPIDEV_AUDIO_DATA, /* Select SPI audio codec device data port */ - SPIDEV_AUDIO_CTRL, /* Select SPI audio codec device control port */ - SPIDEV_BMI055_GYR /* Select SPI BMI055 Gyroscope */ + SPIDEV_AUDIO_CTRL /* Select SPI audio codec device control port */ }; /* Certain SPI devices may required different clocking modes */