Without this, we can't talk to the chip very well
Signed-off-by: Keith Packard <keithp@keithp.com>
#include <ao_mpu6000.h>
#include <ao_exti.h>
#include <ao_mpu6000.h>
#include <ao_exti.h>
static uint8_t ao_mpu6000_wake;
static uint8_t ao_mpu6000_configured;
static uint8_t ao_mpu6000_wake;
static uint8_t ao_mpu6000_configured;
ao_mpu6000_configured = 0;
ao_add_task(&ao_mpu6000_task, ao_mpu6000, "mpu6000");
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]);
}
ao_cmd_register(&ao_mpu6000_cmds[0]);
}
#define AO_MPU6000_INT_PORT (&stm_gpioe)
#define AO_MPU6000_INT_PIN 0
#define AO_MPU6000_SPI_BUS AO_SPI_1_PE13_PE14_PE15
#define AO_MPU6000_INT_PORT (&stm_gpioe)
#define AO_MPU6000_INT_PIN 0
#define AO_MPU6000_SPI_BUS AO_SPI_1_PE13_PE14_PE15