boards: Use MS56XX instead of MS5611
Signed-off-by: Takumi Ando <t-ando@advaly.co.jp>
This commit is contained in:
parent
3353bd3ced
commit
e11627d0fb
@ -24,7 +24,7 @@ ifeq ($(CONFIG_SENSORS_BMP180),y)
|
|||||||
CSRCS += stm32_bmp180.c
|
CSRCS += stm32_bmp180.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_SENSORS_MS5611),y)
|
ifeq ($(CONFIG_SENSORS_MS56XX),y)
|
||||||
CSRCS += stm32_ms5611.c
|
CSRCS += stm32_ms5611.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sensors/ms5611.h>
|
#include <nuttx/sensors/ms56xx.h>
|
||||||
#include <nuttx/i2c/i2c_master.h>
|
#include <nuttx/i2c/i2c_master.h>
|
||||||
|
|
||||||
#include "stm32_i2c.h"
|
#include "stm32_i2c.h"
|
||||||
@ -69,7 +69,7 @@ int board_ms5611_initialize(int devno, int busno)
|
|||||||
|
|
||||||
snprintf(devpath, sizeof(devpath), "/dev/press%d", devno);
|
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)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
snerr("ERROR: Error registering MS5611 in I2C%d\n", busno);
|
snerr("ERROR: Error registering MS5611 in I2C%d\n", busno);
|
||||||
|
@ -76,7 +76,7 @@
|
|||||||
#include "stm32_bmp180.h"
|
#include "stm32_bmp180.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
#include "stm32_ms5611.h"
|
#include "stm32_ms5611.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -217,7 +217,7 @@ int stm32_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
/* Initialize the MS5611 pressure sensor. */
|
/* Initialize the MS5611 pressure sensor. */
|
||||||
|
|
||||||
ret = board_ms5611_initialize(0, 1);
|
ret = board_ms5611_initialize(0, 1);
|
||||||
|
@ -92,7 +92,7 @@ ifeq ($(CONFIG_SENSORS_SHT3X),y)
|
|||||||
CSRCS += esp32_sht3x.c
|
CSRCS += esp32_sht3x.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifeq ($(CONFIG_SENSORS_MS5611),y)
|
ifeq ($(CONFIG_SENSORS_MS56XX),y)
|
||||||
CSRCS += esp32_ms5611.c
|
CSRCS += esp32_ms5611.c
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
#include <debug.h>
|
#include <debug.h>
|
||||||
|
|
||||||
#include <nuttx/arch.h>
|
#include <nuttx/arch.h>
|
||||||
#include <nuttx/sensors/ms5611.h>
|
#include <nuttx/sensors/ms56xx.h>
|
||||||
#include <nuttx/i2c/i2c_master.h>
|
#include <nuttx/i2c/i2c_master.h>
|
||||||
|
|
||||||
#include "esp32_board_i2c.h"
|
#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 */
|
/* 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)
|
if (ret < 0)
|
||||||
{
|
{
|
||||||
snerr("ERROR: Error registering MS5611 in I2C%d\n", busno);
|
snerr("ERROR: Error registering MS5611 in I2C%d\n", busno);
|
||||||
|
@ -35,7 +35,7 @@ CONFIG_IDLETHREAD_STACKSIZE=3072
|
|||||||
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
CONFIG_INIT_ENTRYPOINT="nsh_main"
|
||||||
CONFIG_INTELHEX_BINARY=y
|
CONFIG_INTELHEX_BINARY=y
|
||||||
CONFIG_MM_REGIONS=3
|
CONFIG_MM_REGIONS=3
|
||||||
CONFIG_MS5611_I2C_FREQUENCY=100000
|
CONFIG_MS56XX_I2C_FREQUENCY=100000
|
||||||
CONFIG_NSH_ARCHINIT=y
|
CONFIG_NSH_ARCHINIT=y
|
||||||
CONFIG_NSH_BUILTIN_APPS=y
|
CONFIG_NSH_BUILTIN_APPS=y
|
||||||
CONFIG_NSH_FILEIOSIZE=512
|
CONFIG_NSH_FILEIOSIZE=512
|
||||||
@ -47,7 +47,7 @@ CONFIG_RAM_START=0x20000000
|
|||||||
CONFIG_RR_INTERVAL=200
|
CONFIG_RR_INTERVAL=200
|
||||||
CONFIG_SCHED_WAITPID=y
|
CONFIG_SCHED_WAITPID=y
|
||||||
CONFIG_SENSORS=y
|
CONFIG_SENSORS=y
|
||||||
CONFIG_SENSORS_MS5611=y
|
CONFIG_SENSORS_MS56XX=y
|
||||||
CONFIG_START_DAY=6
|
CONFIG_START_DAY=6
|
||||||
CONFIG_START_MONTH=12
|
CONFIG_START_MONTH=12
|
||||||
CONFIG_START_YEAR=2011
|
CONFIG_START_YEAR=2011
|
||||||
|
@ -116,7 +116,7 @@
|
|||||||
# include "esp32_sht3x.h"
|
# include "esp32_sht3x.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
# include "esp32_ms5611.h"
|
# include "esp32_ms5611.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -590,7 +590,7 @@ int esp32_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
/* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */
|
/* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */
|
||||||
|
|
||||||
ret = board_ms5611_initialize(0, 0);
|
ret = board_ms5611_initialize(0, 0);
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
# include "esp32_sht3x.h"
|
# include "esp32_sht3x.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
# include "esp32_ms5611.h"
|
# include "esp32_ms5611.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -459,7 +459,7 @@ int esp32_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
/* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */
|
/* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */
|
||||||
|
|
||||||
ret = board_ms5611_initialize(0, 0);
|
ret = board_ms5611_initialize(0, 0);
|
||||||
|
@ -103,7 +103,7 @@
|
|||||||
# include "esp32_sht3x.h"
|
# include "esp32_sht3x.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
# include "esp32_ms5611.h"
|
# include "esp32_ms5611.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -473,7 +473,7 @@ int esp32_bringup(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_SENSORS_MS5611
|
#ifdef CONFIG_SENSORS_MS56XX
|
||||||
/* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */
|
/* Try to register MS5611 device in I2C0 as device 0: I2C addr 0x77 */
|
||||||
|
|
||||||
ret = board_ms5611_initialize(0, 0);
|
ret = board_ms5611_initialize(0, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user