Fix SPI speed for MPU6000 for CC3D target and some new targets

This commit is contained in:
borisbstyle 2016-04-15 15:54:15 +02:00
parent bdaf8ecbb9
commit 9000decdf7
1 changed files with 2 additions and 0 deletions

View File

@ -132,6 +132,8 @@ void mpu6000SpiGyroInit(uint8_t lpf)
mpu6000WriteRegister(MPU6000_CONFIG, lpf);
delayMicroseconds(1);
spiSetDivisor(MPU6000_SPI_INSTANCE, SPI_18MHZ_CLOCK_DIVIDER); // 18 MHz SPI clock
int16_t data[3];
mpuGyroRead(data);