1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-26 17:55:30 +03:00

hack for cc3d interrupt

This commit is contained in:
henn1001 2015-10-07 21:17:12 +02:00
parent 3f10c0c184
commit dbcfa5dc43
3 changed files with 43 additions and 1 deletions

View file

@ -126,6 +126,8 @@ void mpu6000SpiGyroInit(uint16_t lpf)
mpu6000AccAndGyroInit();
mpuIntExtiInit();
spiResetErrorCounter(MPU6000_SPI_INSTANCE);
spiSetDivisor(MPU6000_SPI_INSTANCE, SPI_0_5625MHZ_CLOCK_DIVIDER);
@ -145,6 +147,7 @@ void mpu6000SpiGyroInit(uint16_t lpf)
void mpu6000SpiAccInit(void)
{
mpuIntExtiInit();
acc_1G = 512 * 8;
}
@ -234,6 +237,13 @@ static void mpu6000AccAndGyroInit(void) {
delayMicroseconds(1);
spiSetDivisor(MPU6000_SPI_INSTANCE, SPI_18MHZ_CLOCK_DIVIDER); // 18 MHz SPI clock
delayMicroseconds(1);
#ifdef USE_MPU_DATA_READY_SIGNAL
// Set MPU Data Ready Signal
mpu6000WriteRegister(MPU6000_INT_ENABLE , MPU_RF_DATA_RDY_EN);
delayMicroseconds(1);
#endif
mpuSpi6000InitDone = true;
}