From 0f52e72fa5b6a7feeb1ed2fff27603f04bca00a9 Mon Sep 17 00:00:00 2001 From: Martin Budden Date: Fri, 30 Dec 2016 18:03:36 +0000 Subject: [PATCH] Improved gyro structure alignment --- src/main/drivers/accgyro.h | 6 +++--- src/main/drivers/accgyro_adxl345.h | 2 +- src/main/drivers/accgyro_mpu.h | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/main/drivers/accgyro.h b/src/main/drivers/accgyro.h index 9661b3a71c..2d1620ef14 100644 --- a/src/main/drivers/accgyro.h +++ b/src/main/drivers/accgyro.h @@ -42,12 +42,12 @@ typedef struct gyroDev_s { sensorGyroInterruptStatusFuncPtr intStatus; extiCallbackRec_t exti; float scale; // scalefactor - volatile bool dataReady; - uint16_t lpf; int16_t gyroADCRaw[XYZ_AXIS_COUNT]; + uint16_t lpf; + volatile bool dataReady; sensor_align_e gyroAlign; - const extiConfig_t *mpuIntExtiConfig; mpuDetectionResult_t mpuDetectionResult; + const extiConfig_t *mpuIntExtiConfig; mpuConfiguration_t mpuConfiguration; } gyroDev_t; diff --git a/src/main/drivers/accgyro_adxl345.h b/src/main/drivers/accgyro_adxl345.h index ee664fc862..50c675fa0e 100644 --- a/src/main/drivers/accgyro_adxl345.h +++ b/src/main/drivers/accgyro_adxl345.h @@ -18,8 +18,8 @@ #pragma once typedef struct drv_adxl345_config_s { - bool useFifo; uint16_t dataRate; + bool useFifo; } drv_adxl345_config_t; bool adxl345Detect(drv_adxl345_config_t *init, accDev_t *acc); diff --git a/src/main/drivers/accgyro_mpu.h b/src/main/drivers/accgyro_mpu.h index 111491598f..1a52f423d3 100644 --- a/src/main/drivers/accgyro_mpu.h +++ b/src/main/drivers/accgyro_mpu.h @@ -124,12 +124,12 @@ typedef void(*mpuResetFuncPtr)(void); extern mpuResetFuncPtr mpuReset; typedef struct mpuConfiguration_s { - uint8_t gyroReadXRegister; // Y and Z must registers follow this, 2 words each mpuReadRegisterFunc read; mpuWriteRegisterFunc write; mpuReadRegisterFunc slowread; mpuWriteRegisterFunc verifywrite; mpuResetFuncPtr reset; + uint8_t gyroReadXRegister; // Y and Z must registers follow this, 2 words each } mpuConfiguration_t; enum gyro_fsr_e {