HAL_F4Light: fixed board's defines to be suitable for new compass/baro autodetection
This commit is contained in:
parent
6e0742630d
commit
ecf2c51a8b
@ -97,31 +97,30 @@
|
||||
|
||||
// use soft I2C driver instead hardware
|
||||
//#define BOARD_SOFT_I2C2
|
||||
#define BOARD_I2C_BUS_INT 1 // hardware internal I2C
|
||||
//#define BOARD_I2C_BUS_EXT 1 // external I2C
|
||||
//#define BOARD_I2C_BUS_INT 1 // hardware internal I2C
|
||||
#define BOARD_I2C_BUS_EXT 1 // external I2C
|
||||
#define BOARD_I2C_BUS_SLOW 1 // slow down bus with this number
|
||||
|
||||
#define HAL_BARO_MS5611_I2C_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_MS5611_I2C_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_MS5611_I2C_ADDR (0x77)
|
||||
|
||||
#define HAL_BARO_BMP280_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_BMP280_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_BMP280_I2C_ADDR (0x76)
|
||||
|
||||
#define HAL_BARO_BMP085_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_BMP085_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_BMP085_I2C_ADDR (0x77)
|
||||
|
||||
#define HAL_BARO_MS5607_I2C_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_MS5607_I2C_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_MS5607_I2C_ADDR (0x77)
|
||||
|
||||
|
||||
#define BOARD_COMPASS_DEFAULT HAL_COMPASS_HMC5843
|
||||
//#define BOARD_HMC5883_DRDY_PIN 38 // PB7 - but it not used by driver
|
||||
|
||||
#define HAL_COMPASS_HMC5843_I2C_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_COMPASS_HMC5843_I2C_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_COMPASS_HMC5843_I2C_ADDR (0x1E)
|
||||
#define HAL_COMPASS_HMC5843_ROTATION ROTATION_NONE
|
||||
|
||||
|
||||
#define BOARD_INS_DEFAULT HAL_INS_MPU60XX_SPI
|
||||
#define BOARD_INS_ROTATION ROTATION_YAW_180
|
||||
#define BOARD_INS_MPU60x0_NAME "mpu6000"
|
||||
|
@ -96,8 +96,8 @@
|
||||
|
||||
//TODO add #define BOARD_HAS_UART3 ?
|
||||
|
||||
#define BOARD_I2C_BUS_INT 1 // hardware internal I2C
|
||||
//#define BOARD_I2C_BUS_EXT 1 // external I2C
|
||||
//#define BOARD_I2C_BUS_INT 1 // hardware internal I2C
|
||||
#define BOARD_I2C_BUS_EXT 1 // external I2C
|
||||
#define BOARD_I2C_BUS_SLOW 1 // slow down bus with this number
|
||||
|
||||
#define BOARD_I2C1_DISABLE // lots of drivers tries to scan all buses, spoiling device setup
|
||||
@ -106,14 +106,14 @@
|
||||
#define HAL_BARO_BMP280_NAME "bmp280"
|
||||
#define BOARD_BMP280_CS_PIN 104
|
||||
|
||||
#define HAL_BARO_MS5611_I2C_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_MS5611_I2C_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_MS5611_I2C_ADDR (0x77)
|
||||
|
||||
#define BOARD_COMPASS_DEFAULT HAL_COMPASS_HMC5843
|
||||
#define BOARD_COMPASS_HMC5843_I2C_ADDR 0x1E
|
||||
#define BOARD_COMPASS_HMC5843_ROTATION ROTATION_NONE
|
||||
|
||||
#define HAL_COMPASS_HMC5843_I2C_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_COMPASS_HMC5843_I2C_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_COMPASS_HMC5843_I2C_ADDR BOARD_COMPASS_HMC5843_I2C_ADDR
|
||||
#define HAL_COMPASS_HMC5843_ROTATION BOARD_COMPASS_HMC5843_ROTATION
|
||||
|
||||
|
@ -86,21 +86,21 @@
|
||||
|
||||
//TODO add #define BOARD_HAS_UART3 ?
|
||||
|
||||
#define BOARD_I2C_BUS_INT 2 // hardware internal I2C
|
||||
//#define BOARD_I2C_BUS_EXT 1 // external I2C
|
||||
//#define BOARD_I2C_BUS_INT 1 // hardware internal I2C
|
||||
#define BOARD_I2C_BUS_EXT 2 // external I2C
|
||||
#define BOARD_I2C_BUS_SLOW 2 // slow down bus with this number
|
||||
|
||||
#define BOARD_I2C1_DISABLE // lots of drivers tries to scan all buses, spoiling device setup
|
||||
#define BOARD_I2C2_DISABLE
|
||||
|
||||
|
||||
#define HAL_BARO_MS5611_I2C_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_MS5611_I2C_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_MS5611_I2C_ADDR (0x77)
|
||||
|
||||
#define HAL_BARO_BMP280_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_BMP280_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_BMP280_I2C_ADDR (0x76)
|
||||
|
||||
#define HAL_BARO_BMP085_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_BARO_BMP085_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_BARO_BMP085_I2C_ADDR (0x77)
|
||||
|
||||
|
||||
@ -108,7 +108,7 @@
|
||||
#define BOARD_COMPASS_HMC5843_I2C_ADDR 0x1E
|
||||
#define BOARD_COMPASS_HMC5843_ROTATION ROTATION_NONE
|
||||
|
||||
#define HAL_COMPASS_HMC5843_I2C_BUS BOARD_I2C_BUS_INT
|
||||
#define HAL_COMPASS_HMC5843_I2C_BUS BOARD_I2C_BUS_EXT
|
||||
#define HAL_COMPASS_HMC5843_I2C_ADDR BOARD_COMPASS_HMC5843_I2C_ADDR
|
||||
#define HAL_COMPASS_HMC5843_ROTATION BOARD_COMPASS_HMC5843_ROTATION
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user