mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-23 08:15:30 +03:00
MPU6050 MPU DATA READY // gyro sync activated
MPU6050 gets DATA READY pin based interrupt instad of i2c SPI targets are still getting interrupt from SPI
This commit is contained in:
parent
60053d5ea5
commit
c45d3e1fdd
3 changed files with 35 additions and 17 deletions
|
@ -31,16 +31,16 @@ extern gyro_t gyro;
|
|||
uint32_t targetLooptime;
|
||||
static uint8_t mpuDivider;
|
||||
|
||||
bool getMpuInterrupt(gyro_t *gyro)
|
||||
bool getMpuDataStatus(gyro_t *gyro)
|
||||
{
|
||||
bool gyroIsUpdated;
|
||||
bool mpuDataStatus;
|
||||
|
||||
gyro->intStatus(&gyroIsUpdated);
|
||||
return gyroIsUpdated;
|
||||
gyro->intStatus(&mpuDataStatus);
|
||||
return mpuDataStatus;
|
||||
}
|
||||
|
||||
bool gyroSyncCheckUpdate(void) {
|
||||
return getMpuInterrupt(&gyro);
|
||||
return getMpuDataStatus(&gyro);
|
||||
}
|
||||
|
||||
void gyroUpdateSampleRate(uint32_t looptime, uint8_t lpf, uint8_t syncGyroToLoop) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue