mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Implementation of the ICM456xx gyroscope driver (#14348)
* add support ICM-45686, ICM45605 gyros Co-authored-by: Mark Haslinghuis <mark@numloq.nl> Co-authored-by: Mark Haslinghuis <mark@numloq.nl> * update PR issue * change IMU order * fix register AAF for Accel, update comments, configure LPF from config * change IMU order * fix access to IPREG_TOP1 registers, update define INT1_CONFIG2 * add read Gyro&Acc via SPI DMA * coderabbitai bot suggestion Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> * fix buf len * codestyle Co-authored-by: Mark Haslinghuis <mark@numloq.nl> * coderabbitai bot suggestion: SPI transfer, Inconsistent accelerometer scale setting * refactor read spi * update PR issue * revert "attempts remaining" for gyro detect * resolve issue Co-authored-by: Petr Ledvina <ledvinap@gmail.com> --------- Co-authored-by: Mark Haslinghuis <mark@numloq.nl> Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> Co-authored-by: Petr Ledvina <ledvinap@gmail.com>
This commit is contained in:
parent
62be38297c
commit
b389c2000d
13 changed files with 740 additions and 3 deletions
|
@ -47,6 +47,7 @@
|
|||
#include "drivers/accgyro/accgyro_spi_icm20649.h"
|
||||
#include "drivers/accgyro/accgyro_spi_icm20689.h"
|
||||
#include "drivers/accgyro/accgyro_spi_icm426xx.h"
|
||||
#include "drivers/accgyro/accgyro_spi_icm456xx.h"
|
||||
|
||||
#include "drivers/accgyro/accgyro_spi_lsm6dso.h"
|
||||
#include "drivers/accgyro/accgyro_spi_lsm6dsv16x.h"
|
||||
|
@ -240,6 +241,26 @@ retry:
|
|||
FALLTHROUGH;
|
||||
#endif
|
||||
|
||||
#if defined(USE_ACCGYRO_ICM45686) || defined(USE_ACCGYRO_ICM45605)
|
||||
case ACC_ICM45686:
|
||||
case ACC_ICM45605:
|
||||
if (icm456xxSpiAccDetect(dev)) {
|
||||
switch (dev->mpuDetectionResult.sensor) {
|
||||
case ICM_45686_SPI:
|
||||
accHardware = ACC_ICM45686;
|
||||
break;
|
||||
case ICM_45605_SPI:
|
||||
accHardware = ACC_ICM45605;
|
||||
break;
|
||||
default:
|
||||
accHardware = ACC_NONE;
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
FALLTHROUGH;
|
||||
#endif
|
||||
|
||||
#ifdef USE_ACCGYRO_BMI160
|
||||
case ACC_BMI160:
|
||||
if (bmi160SpiAccDetect(dev)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue