The 'I' command dumps the who-am-i register. the thread isn't running.
Signed-off-by: Keith Packard <keithp@keithp.com>
static void
ao_mpu6000_show(void)
{
+#if 0
struct ao_data sample;
ao_data_get(&sample);
sample.mpu6000.gyro_x,
sample.mpu6000.gyro_y,
sample.mpu6000.gyro_z);
+#endif
+ printf ("who-am-i: %02x\n", ao_mpu6000_reg_read(MPU6000_WHO_AM_I));
}
static const struct ao_cmds ao_mpu6000_cmds[] = {
{
ao_mpu6000_configured = 0;
- ao_add_task(&ao_mpu6000_task, ao_mpu6000, "mpu6000");
+// ao_add_task(&ao_mpu6000_task, ao_mpu6000, "mpu6000");
ao_cmd_register(&ao_mpu6000_cmds[0]);
}
#endif
* mpu6000
*/
-#define HAS_MPU6000 0
+#define HAS_MPU6000 1
#define AO_MPU6000_INT_PORT (&stm_gpioe)
#define AO_MPU6000_INT_PIN 0
#define AO_MPU6000_SPI_BUS AO_SPI_1_PE13_PE14_PE15