Skip to content

Commit

Permalink
Merge pull request #10555 from Minderring/fix-driver-barometer-addres…
Browse files Browse the repository at this point in the history
…s-define

Fix barometer I2C address redefine issues
  • Loading branch information
mmosca authored Jan 10, 2025
2 parents 277935d + 7e8be7e commit a41ba3e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/main/drivers/barometer/barometer_bmp085.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@

#if defined(USE_BARO_BMP085)

#if !defined(BMP085_I2C_ADDR)
#define BMP085_I2C_ADDR 0x77
#endif
#define BMP085_CHIP_ID 0x55

typedef struct {
Expand Down
2 changes: 2 additions & 0 deletions src/main/drivers/barometer/barometer_bmp388.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@

#if defined(USE_BARO) && (defined(USE_BARO_BMP388) || defined(USE_BARO_SPI_BMP388) || defined(USE_BARO_BMP390) || defined(USE_BARO_SPI_BMP390))

#if !defined(BMP388_I2C_ADDR)
#define BMP388_I2C_ADDR (0x76) // same as BMP280/BMP180
#endif
#define BMP388_DEFAULT_CHIP_ID (0x50) // from https://github.com/BoschSensortec/BMP3-Sensor-API/blob/master/bmp3_defs.h#L130
#define BMP390_DEFAULT_CHIP_ID (0x60) // from https://github.com/BoschSensortec/BMP3-Sensor-API/blob/master/bmp3_defs.h#L133

Expand Down
2 changes: 2 additions & 0 deletions src/main/drivers/barometer/barometer_spl06.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@

#pragma once

#if !defined(SPL06_I2C_ADDR)
#define SPL06_I2C_ADDR 0x76
#endif
#define SPL06_DEFAULT_CHIP_ID 0x10

#define SPL06_PRESSURE_START_REG 0x00
Expand Down

0 comments on commit a41ba3e

Please sign in to comment.