diff --git a/boards/arm/stm32/common/src/Make.defs b/boards/arm/stm32/common/src/Make.defs index 720dc66e0a..4cdb9f7ac2 100644 --- a/boards/arm/stm32/common/src/Make.defs +++ b/boards/arm/stm32/common/src/Make.defs @@ -24,7 +24,7 @@ ifeq ($(CONFIG_SENSORS_BMP180),y) CSRCS += stm32_bmp180.c endif -ifeq ($(CONFIG_SENSORS_MS5611),y) +ifeq ($(CONFIG_SENSORS_MS56XX),y) CSRCS += stm32_ms5611.c endif diff --git a/boards/arm/stm32/common/src/stm32_ms5611.c b/boards/arm/stm32/common/src/stm32_ms5611.c index c016d01c81..9ef08a1e2b 100644 --- a/boards/arm/stm32/common/src/stm32_ms5611.c +++ b/boards/arm/stm32/common/src/stm32_ms5611.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "stm32_i2c.h" @@ -69,7 +69,7 @@ int board_ms5611_initialize(int devno, int busno) snprintf(devpath, sizeof(devpath), "/dev/press%d", devno); - ret = ms5611_register(i2c, devno, MS5611_ADDR0); + ret = ms56xx_register(i2c, devno, MS56XX_ADDR0, MS56XX_MODEL_MS5611); if (ret < 0) { snerr("ERROR: Error registering MS5611 in I2C%d\n", busno); diff --git a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c index 855f85a3ea..4a62e0b64a 100644 --- a/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c +++ b/boards/arm/stm32/stm32f4discovery/src/stm32_bringup.c @@ -76,7 +76,7 @@ #include "stm32_bmp180.h" #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX #include "stm32_ms5611.h" #endif @@ -217,7 +217,7 @@ int stm32_bringup(void) } #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX /* Initialize the MS5611 pressure sensor. */ ret = board_ms5611_initialize(0, 1); diff --git a/boards/xtensa/esp32/common/src/Make.defs b/boards/xtensa/esp32/common/src/Make.defs index 946c0e28b9..121dea0e4f 100644 --- a/boards/xtensa/esp32/common/src/Make.defs +++ b/boards/xtensa/esp32/common/src/Make.defs @@ -92,7 +92,7 @@ ifeq ($(CONFIG_SENSORS_SHT3X),y) CSRCS += esp32_sht3x.c endif -ifeq ($(CONFIG_SENSORS_MS5611),y) +ifeq ($(CONFIG_SENSORS_MS56XX),y) CSRCS += esp32_ms5611.c endif diff --git a/boards/xtensa/esp32/common/src/esp32_ms5611.c b/boards/xtensa/esp32/common/src/esp32_ms5611.c index ced7296304..0f5e911701 100644 --- a/boards/xtensa/esp32/common/src/esp32_ms5611.c +++ b/boards/xtensa/esp32/common/src/esp32_ms5611.c @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include "esp32_board_i2c.h" @@ -83,7 +83,7 @@ int board_ms5611_initialize(int devno, int busno) { /* Then try to register the barometer sensor in I2C0 */ - ret = ms5611_register(i2c, devno, MS5611_ADDR0); + ret = ms56xx_register(i2c, devno, MS56XX_ADDR0, MS56XX_MODEL_MS5611); if (ret < 0) { snerr("ERROR: Error registering MS5611 in I2C%d\n", busno); diff --git a/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig b/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig index 85deb18709..e90cbf8b9b 100644 --- a/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig +++ b/boards/xtensa/esp32/esp32-devkitc/configs/ms5611/defconfig @@ -35,7 +35,7 @@ CONFIG_IDLETHREAD_STACKSIZE=3072 CONFIG_INIT_ENTRYPOINT="nsh_main" CONFIG_INTELHEX_BINARY=y CONFIG_MM_REGIONS=3 -CONFIG_MS5611_I2C_FREQUENCY=100000 +CONFIG_MS56XX_I2C_FREQUENCY=100000 CONFIG_NSH_ARCHINIT=y CONFIG_NSH_BUILTIN_APPS=y CONFIG_NSH_FILEIOSIZE=512 @@ -47,7 +47,7 @@ CONFIG_RAM_START=0x20000000 CONFIG_RR_INTERVAL=200 CONFIG_SCHED_WAITPID=y CONFIG_SENSORS=y -CONFIG_SENSORS_MS5611=y +CONFIG_SENSORS_MS56XX=y CONFIG_START_DAY=6 CONFIG_START_MONTH=12 CONFIG_START_YEAR=2011 diff --git a/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c b/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c index ec2f5b24f2..cf023e0b59 100644 --- a/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c +++ b/boards/xtensa/esp32/esp32-devkitc/src/esp32_bringup.c @@ -116,7 +116,7 @@ # include "esp32_sht3x.h" #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX # include "esp32_ms5611.h" #endif @@ -590,7 +590,7 @@ int esp32_bringup(void) } #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX /* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */ ret = board_ms5611_initialize(0, 0); diff --git a/boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_bringup.c b/boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_bringup.c index 845cfd103c..f06819b4c9 100644 --- a/boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_bringup.c +++ b/boards/xtensa/esp32/ttgo_eink5_v2/src/esp32_bringup.c @@ -103,7 +103,7 @@ # include "esp32_sht3x.h" #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX # include "esp32_ms5611.h" #endif @@ -459,7 +459,7 @@ int esp32_bringup(void) } #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX /* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */ ret = board_ms5611_initialize(0, 0); diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_bringup.c b/boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_bringup.c index 9e054b7682..9c39a8789f 100644 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_bringup.c +++ b/boards/xtensa/esp32/ttgo_t_display_esp32/src/esp32_bringup.c @@ -103,7 +103,7 @@ # include "esp32_sht3x.h" #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX # include "esp32_ms5611.h" #endif @@ -473,7 +473,7 @@ int esp32_bringup(void) } #endif -#ifdef CONFIG_SENSORS_MS5611 +#ifdef CONFIG_SENSORS_MS56XX /* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */ ret = board_ms5611_initialize(0, 0);