From 254b71468c4f950a81c4d3d80cdd48b799659da3 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Thu, 3 Nov 2016 09:33:54 +1100 Subject: [PATCH] HAL_PX4: added ms5611_int SPI descriptor --- libraries/AP_HAL_PX4/SPIDevice.cpp | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/libraries/AP_HAL_PX4/SPIDevice.cpp b/libraries/AP_HAL_PX4/SPIDevice.cpp index 9847e30a05..d0c766284b 100644 --- a/libraries/AP_HAL_PX4/SPIDevice.cpp +++ b/libraries/AP_HAL_PX4/SPIDevice.cpp @@ -33,10 +33,16 @@ static const AP_HAL::HAL &hal = AP_HAL::get_HAL(); #define KHZ (1000U) SPIDesc SPIDeviceManager::device_table[] = { - SPIDesc("mpu6000", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_MPU, SPIDEV_MODE3, 500*KHZ, 11*MHZ), - SPIDesc("ms5611", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_BARO, SPIDEV_MODE3, 10*MHZ, 10*MHZ), - SPIDesc("lsm9ds0_a", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_ACCEL_MAG, SPIDEV_MODE3, 10*MHZ, 10*MHZ), - SPIDesc("lsm9ds0_g", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_GYRO, SPIDEV_MODE3, 10*MHZ, 10*MHZ), + SPIDesc("mpu6000", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_MPU, SPIDEV_MODE3, 500*KHZ, 11*MHZ), +#if defined(PX4_SPI_BUS_EXT) + SPIDesc("ms5611_ext", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_BARO, SPIDEV_MODE3, 10*MHZ, 10*MHZ), +#endif +#if CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_PX4_V4 + SPIDesc("ms5611_int", PX4_SPI_BUS_BARO, (spi_dev_e)PX4_SPIDEV_BARO, SPIDEV_MODE3, 10*MHZ, 10*MHZ), +#endif + SPIDesc("ms5611", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_BARO, SPIDEV_MODE3, 10*MHZ, 10*MHZ), + SPIDesc("lsm9ds0_a", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_ACCEL_MAG, SPIDEV_MODE3, 10*MHZ, 10*MHZ), + SPIDesc("lsm9ds0_g", PX4_SPI_BUS_SENSORS, (spi_dev_e)PX4_SPIDEV_GYRO, SPIDEV_MODE3, 10*MHZ, 10*MHZ), SPIDesc(nullptr, 0, (spi_dev_e)0, (spi_mode_e)0, 0, 0), };