From: Keith Packard Date: Tue, 14 May 2013 17:36:17 +0000 (-0700) Subject: altos: Initialize MPU6000 CS pin for SPI mode X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=72a52875e55fef30d3cddf1fe4ee707088c2c150;p=fw%2Faltos altos: Initialize MPU6000 CS pin for SPI mode Without this, we can't talk to the chip very well Signed-off-by: Keith Packard --- diff --git a/src/drivers/ao_mpu6000.c b/src/drivers/ao_mpu6000.c index 9bb99132..fb2d54c0 100644 --- a/src/drivers/ao_mpu6000.c +++ b/src/drivers/ao_mpu6000.c @@ -331,6 +331,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