1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 01:05:27 +03:00

Merge pull request #11305 from SteveCEvans/unified_ICM42688P

Add support for ICM42605 and ICM42688P for unified targets except F411
This commit is contained in:
haslinghuis 2022-01-17 22:14:41 +01:00 committed by GitHub
commit 07cc5c44c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 2 deletions

View file

@ -370,6 +370,7 @@ SIZE_OPTIMISED_SRC := $(SIZE_OPTIMISED_SRC) \
drivers/accgyro/accgyro_spi_mpu6500.c \
drivers/accgyro/accgyro_spi_mpu9250.c \
drivers/accgyro/accgyro_spi_icm20689.c \
drivers/accgyro/accgyro_spi_icm426xx.c \
drivers/accgyro/accgyro_spi_lsm6dso_init.c

View file

@ -217,7 +217,7 @@ bool mpuAccReadSPI(accDev_t *acc)
case GYRO_EXTI_INT:
case GYRO_EXTI_NO_INT:
{
acc->gyro->dev.txBuf[0] = MPU_RA_ACCEL_XOUT_H | 0x80;
acc->gyro->dev.txBuf[0] = acc->gyro->accDataReg | 0x80;
busSegment_t segments[] = {
{.u.buffers = {NULL, NULL}, 7, true, NULL},
@ -294,7 +294,7 @@ bool mpuGyroReadSPI(gyroDev_t *gyro)
case GYRO_EXTI_INT:
case GYRO_EXTI_NO_INT:
{
gyro->dev.txBuf[0] = MPU_RA_GYRO_XOUT_H | 0x80;
gyro->dev.txBuf[0] = gyro->gyroDataReg | 0x80;
busSegment_t segments[] = {
{.u.buffers = {NULL, NULL}, 7, true, NULL},

View file

@ -239,6 +239,13 @@
#define USE_ACCGYRO_LSM6DSO
#define USE_ACCGYRO_BMI270
#if !defined(STM32F411xE)
#define USE_GYRO_SPI_ICM42605
#define USE_GYRO_SPI_ICM42688P
#define USE_ACC_SPI_ICM42605
#define USE_ACC_SPI_ICM42688P
#endif
#define USE_MAG
#define USE_MAG_DATA_READY_SIGNAL
#define USE_MAG_HMC5883