mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2025-02-21 11:54:15 +01:00
Make sure BMA180/L3GD20 can be disabled
This commit is contained in:
parent
4d3af7afbf
commit
be50c00b7c
@ -1744,12 +1744,15 @@ void PIOS_Board_Init(void) {
|
|||||||
if (PIOS_SPI_Init(&pios_spi_gyro_id, &pios_spi_gyro_cfg)) {
|
if (PIOS_SPI_Init(&pios_spi_gyro_id, &pios_spi_gyro_cfg)) {
|
||||||
PIOS_Assert(0);
|
PIOS_Assert(0);
|
||||||
}
|
}
|
||||||
|
#if defined(PIOS_INCLUDE_L3GD20)
|
||||||
PIOS_L3GD20_Attach(pios_spi_gyro_id);
|
PIOS_L3GD20_Attach(pios_spi_gyro_id);
|
||||||
PIOS_L3GD20_Init(&pios_l3gd20_cfg);
|
PIOS_L3GD20_Init(&pios_l3gd20_cfg);
|
||||||
|
#endif /* PIOS_INCLUDE_L3GD20 */
|
||||||
|
|
||||||
|
#if defined(PIOS_INCLUDE_BMA180)
|
||||||
PIOS_BMA180_Attach(pios_spi_flash_accel_id);
|
PIOS_BMA180_Attach(pios_spi_flash_accel_id);
|
||||||
PIOS_BMA180_Init(&pios_bma180_cfg);
|
PIOS_BMA180_Init(&pios_bma180_cfg);
|
||||||
|
#endif /* PIOS_INCLUDE_BMA180 */
|
||||||
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user