From 7179d93f000e4922cddeb25d61259c20eba6c7b8 Mon Sep 17 00:00:00 2001 From: Hydra Date: Sun, 5 Mar 2017 00:58:27 +0000 Subject: [PATCH] CF/BF - Fix AK8975 mag detection that was broken in 196baa4e8715de8edd0ef0a8f0bd8c4d34ebf828. The bit to enable bypass mode was incorrect. --- src/main/drivers/accgyro_mpu6500.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/main/drivers/accgyro_mpu6500.h b/src/main/drivers/accgyro_mpu6500.h index 3cedd2027..ec964956b 100644 --- a/src/main/drivers/accgyro_mpu6500.h +++ b/src/main/drivers/accgyro_mpu6500.h @@ -23,9 +23,14 @@ #define ICM20602_WHO_AM_I_CONST (0x12) #define MPU6500_BIT_RESET (0x80) -#define MPU6500_BIT_INT_ANYRD_2CLEAR (1 << 4) -#define MPU6500_BIT_BYPASS_EN (1 << 0) -#define MPU6500_BIT_I2C_IF_DIS (1 << 4) + +// Register 0x37/55 - INT_PIN_CFG / Pin Bypass Enable Configuration +#define MPU6500_BIT_RESERVED 1 << 0 +#define MPU6500_BIT_BYPASS_EN 1 << 1 +#define MPU6500_BIT_INT_ANYRD_2CLEAR 1 << 4 + +// Register 0x6a/106 - USER_CTRL / User Control +#define MPU6500_BIT_I2C_IF_DIS 1 << 4 #define MPU6500_BIT_RAW_RDY_EN (0x01) bool mpu6500AccDetect(accDev_t *acc);