X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fdrivers%2Fao_mpu6000.c;fp=src%2Fdrivers%2Fao_mpu6000.c;h=fc768cc9ae1cdc166f4add87866d4e505df101f9;hb=9beacd77b3e8106e036e50a67312dfee414fbc51;hp=c65aecbcc1d363f9db603ea439f7c27b756df47d;hpb=6d553230903ddd0ec522c07be0df975b38ef23d3;p=fw%2Faltos diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c index c65aecbc..fc768cc9 100644 --- a/src/drivers/ao_mpu6000.c +++ b/src/drivers/ao_mpu6000.c @@ -19,6 +19,8 @@ #include #include +#if HAS_MPU6000 + static uint8_t ao_mpu6000_wake; static uint8_t ao_mpu6000_configured; @@ -326,5 +328,9 @@ ao_mpu6000_init(void) ao_mpu6000_configured = 0; ao_add_task(&ao_mpu6000_task, ao_mpu6000, "mpu6000"); +#ifndef AO_MPU6000_I2C_INDEX + ao_spi_init_cs(AO_MPU6000_SPI_CS_PORT, (1 << AO_MPU6000_SPI_CS_PIN)); +#endif ao_cmd_register(&ao_mpu6000_cmds[0]); } +#endif