diff --git a/src/main/drivers/accgyro/accgyro_mpu.c b/src/main/drivers/accgyro/accgyro_mpu.c index a9d3f0631b..d15d4aa79a 100644 --- a/src/main/drivers/accgyro/accgyro_mpu.c +++ b/src/main/drivers/accgyro/accgyro_mpu.c @@ -61,10 +61,6 @@ mpuResetFnPtr mpuResetFn; #define MPU_ADDRESS 0x68 #endif -// WHO_AM_I register contents for MPU3050, 6050 and 6500 -#define MPU6500_WHO_AM_I_CONST (0x70) -#define MPUx0x0_WHO_AM_I_CONST (0x68) - #define MPU_INQUIRY_MASK 0x7E static void mpu6050FindRevision(gyroDev_t *gyro) diff --git a/src/main/drivers/accgyro/accgyro_mpu.h b/src/main/drivers/accgyro/accgyro_mpu.h index 1cd9f55004..04d27c084e 100644 --- a/src/main/drivers/accgyro/accgyro_mpu.h +++ b/src/main/drivers/accgyro/accgyro_mpu.h @@ -31,6 +31,19 @@ #define MPU_RA_WHO_AM_I 0x75 #define MPU_RA_WHO_AM_I_LEGACY 0x00 + +#define MPUx0x0_WHO_AM_I_CONST (0x68) // MPU3050, 6000 and 6050 +#define MPU6000_WHO_AM_I_CONST (0x68) +#define MPU6500_WHO_AM_I_CONST (0x70) +#define MPU9250_WHO_AM_I_CONST (0x71) +#define MPU9255_WHO_AM_I_CONST (0x73) +#define ICM20601_WHO_AM_I_CONST (0xAC) +#define ICM20602_WHO_AM_I_CONST (0x12) +#define ICM20608G_WHO_AM_I_CONST (0xAF) +#define ICM20689_WHO_AM_I_CONST (0x98) + + + // RA = Register Address #define MPU_RA_XG_OFFS_TC 0x00 //[7] PWR_MODE, [6:1] XG_OFFS_TC, [0] OTP_BNK_VLD diff --git a/src/main/drivers/accgyro/accgyro_mpu6500.h b/src/main/drivers/accgyro/accgyro_mpu6500.h index a176543e55..bdc3ccd04f 100644 --- a/src/main/drivers/accgyro/accgyro_mpu6500.h +++ b/src/main/drivers/accgyro/accgyro_mpu6500.h @@ -17,13 +17,6 @@ #pragma once -#define MPU6500_WHO_AM_I_CONST (0x70) -#define MPU9250_WHO_AM_I_CONST (0x71) -#define MPU9255_WHO_AM_I_CONST (0x73) -#define ICM20601_WHO_AM_I_CONST (0xAC) -#define ICM20602_WHO_AM_I_CONST (0x12) -#define ICM20608G_WHO_AM_I_CONST (0xAF) - #define MPU6500_BIT_RESET (0x80) // Register 0x37/55 - INT_PIN_CFG / Pin Bypass Enable Configuration diff --git a/src/main/drivers/accgyro/accgyro_spi_icm20689.h b/src/main/drivers/accgyro/accgyro_spi_icm20689.h index 57cc827f89..cf10e77674 100644 --- a/src/main/drivers/accgyro/accgyro_spi_icm20689.h +++ b/src/main/drivers/accgyro/accgyro_spi_icm20689.h @@ -18,7 +18,6 @@ #include "drivers/bus.h" -#define ICM20689_WHO_AM_I_CONST (0x98) #define ICM20689_BIT_RESET (0x80) bool icm20689AccDetect(accDev_t *acc); diff --git a/src/main/drivers/accgyro/accgyro_spi_mpu6000.h b/src/main/drivers/accgyro/accgyro_spi_mpu6000.h index 7682a28726..def32573ca 100644 --- a/src/main/drivers/accgyro/accgyro_spi_mpu6000.h +++ b/src/main/drivers/accgyro/accgyro_spi_mpu6000.h @@ -12,8 +12,6 @@ #define GYRO_SCALE_FACTOR 0.00053292f // (4/131) * pi/180 (32.75 LSB = 1 DPS) -#define MPU6000_WHO_AM_I_CONST (0x68) - // RF = Register Flag #define MPU_RF_DATA_RDY_EN (1 << 0) diff --git a/src/main/drivers/accgyro/accgyro_spi_mpu9250.h b/src/main/drivers/accgyro/accgyro_spi_mpu9250.h index e7d3958c62..8ddc120cc3 100644 --- a/src/main/drivers/accgyro/accgyro_spi_mpu9250.h +++ b/src/main/drivers/accgyro/accgyro_spi_mpu9250.h @@ -18,9 +18,6 @@ #define GYRO_SCALE_FACTOR 0.00053292f // (4/131) * pi/180 (32.75 LSB = 1 DPS) -#define MPU9250_WHO_AM_I_CONST (0x71) -#define MPU9255_WHO_AM_I_CONST (0x73) - #define MPU9250_BIT_RESET (0x80) // RF = Register Flag