mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-13 11:29:58 +03:00
Remove GYRO defines from common_post_defaults (#12406)
This commit is contained in:
parent
eacbf0d548
commit
fbca7f06f3
3 changed files with 41 additions and 45 deletions
|
@ -34,6 +34,22 @@
|
|||
#include "drivers/sensor.h"
|
||||
#include "sensors/gyro.h"
|
||||
|
||||
#ifndef GYRO_1_SPI_INSTANCE
|
||||
#define GYRO_1_SPI_INSTANCE NULL
|
||||
#endif
|
||||
|
||||
#ifndef GYRO_1_CS_PIN
|
||||
#define GYRO_1_CS_PIN NONE
|
||||
#endif
|
||||
|
||||
#ifndef GYRO_1_EXTI_PIN
|
||||
#define GYRO_1_EXTI_PIN NONE
|
||||
#endif
|
||||
|
||||
#ifndef GYRO_2_SPI_INSTANCE
|
||||
#define GYRO_2_SPI_INSTANCE NULL
|
||||
#endif
|
||||
|
||||
#ifndef GYRO_2_CS_PIN
|
||||
#define GYRO_2_CS_PIN NONE
|
||||
#endif
|
||||
|
@ -42,6 +58,23 @@
|
|||
#define GYRO_2_EXTI_PIN NONE
|
||||
#endif
|
||||
|
||||
#ifdef MPU_ADDRESS
|
||||
#define GYRO_I2C_ADDRESS MPU_ADDRESS
|
||||
#else
|
||||
// 0 == AUTO
|
||||
#define GYRO_I2C_ADDRESS 0
|
||||
#endif
|
||||
|
||||
// gyro alignments
|
||||
|
||||
#ifndef GYRO_1_ALIGN
|
||||
#define GYRO_1_ALIGN CW0_DEG
|
||||
#endif
|
||||
|
||||
#ifndef GYRO_2_ALIGN
|
||||
#define GYRO_2_ALIGN CW0_DEG
|
||||
#endif
|
||||
|
||||
ioTag_t selectMPUIntExtiConfigByHardwareRevision(void); // XXX Should be gone
|
||||
|
||||
#if defined(USE_SPI_GYRO) || defined(USE_I2C_GYRO)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue