sensors: mpu6050: Add support for variant mpu6886
This commit adds support for mpu6886, which has compatible register layout. Signed-off-by: Martin Kiepfer <m.kiepfer@teleschirm.org>
This commit is contained in:
parent
bc5f78d9ba
commit
aef1611e1f
|
@ -161,7 +161,7 @@ int mpu6050_init(const struct device *dev)
|
|||
return -EIO;
|
||||
}
|
||||
|
||||
if (id != MPU6050_CHIP_ID && id != MPU9250_CHIP_ID) {
|
||||
if ((id != MPU6050_CHIP_ID) && (id != MPU9250_CHIP_ID) && (id != MPU6880_CHIP_ID)) {
|
||||
LOG_ERR("Invalid chip ID.");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#define MPU6050_REG_CHIP_ID 0x75
|
||||
#define MPU6050_CHIP_ID 0x68
|
||||
#define MPU9250_CHIP_ID 0x71
|
||||
#define MPU6880_CHIP_ID 0x19
|
||||
|
||||
#define MPU6050_REG_GYRO_CFG 0x1B
|
||||
#define MPU6050_GYRO_FS_SHIFT 3
|
||||
|
|
Loading…
Reference in a new issue