Synopsis
CTL_STATUS_t mpu6000_initialize_spi(MPU6000_t *self,
                                    CTL_SPI_DEVICE_t *dev);
Description

mpu6000_initialize_spi initializes the MPU-6000's accelerometer and gyroscope, on the SPI bus associated with dev. The MPU-6000 device dev is initialized to 8-bit mode 0 at 1 MHz. When complete, the the IMU member core is initialized pointing to the appropriate members within self with the magnetometer set to zero.

Return Value

mpu6000_initialize_spi returns a standard status code.

Thread Safety

mpu6000_initialize_spi is thread-safe if a mutex is associated with the SPI bus that dev is attached to.

See Also

<ctl_sensors.h>