Merge pull request #347 from borisbstyle/spi_fix_mpu6000

Fix SPI speed for MPU6000 for CC3D target and some new targets
This commit is contained in:
borisbstyle 2016-04-16 01:16:14 +02:00
commit 8e744e874c
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);