AP_HAL_Linux: Add support for SPIDevice_LSM9DS0

The LSM9DS0 SPI device is connected to
SPI0, thereby SPIDriver class should return the
corresponding device.
This commit is contained in:
Víctor Mayoral Vilches 2014-05-14 16:31:06 +02:00 committed by Andrew Tridgell
parent c4babc543d
commit 8af1b6faa7
2 changed files with 5 additions and 2 deletions

View File

@ -53,7 +53,8 @@ namespace AP_HAL {
SPIDevice_MPU6000,
SPIDevice_ADNS3080_SPI0,
SPIDevice_ADNS3080_SPI3,
SPIDevice_MPU9250
SPIDevice_MPU9250,
SPIDevice_LSM9DS0
};
}

View File

@ -129,7 +129,9 @@ AP_HAL::SPIDeviceDriver* LinuxSPIDeviceManager::device(enum AP_HAL::SPIDevice de
case AP_HAL::SPIDevice_MPU9250:
return &_device_cs1;
case AP_HAL::SPIDevice_MS5611:
return &_device_cs1;
return &_device_cs1;
case AP_HAL::SPIDevice_LSM9DS0:
return &_device_cs0;
}
return NULL;
}