From 72a52875e55fef30d3cddf1fe4ee707088c2c150 Mon Sep 17 00:00:00 2001 From: Keith Packard Date: Tue, 14 May 2013 10:36:17 -0700 Subject: [PATCH] altos: Initialize MPU6000 CS pin for SPI mode Without this, we can't talk to the chip very well Signed-off-by: Keith Packard --- src/drivers/ao_mpu6000.c | 3 +++ 1 file changed, 3 insertions(+) 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 -- 2.47.2