From 7aaccd79af763f674d6f49b977de2299c5261ae2 Mon Sep 17 00:00:00 2001 From: Alexandre B Date: Wed, 10 Jul 2024 10:26:02 -0400 Subject: [PATCH] . --- ESP32-IDF_BMP280/main/main.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ESP32-IDF_BMP280/main/main.c b/ESP32-IDF_BMP280/main/main.c index 147c67e51..e74a27c49 100644 --- a/ESP32-IDF_BMP280/main/main.c +++ b/ESP32-IDF_BMP280/main/main.c @@ -33,7 +33,7 @@ static const char *TAG = "i2c-simple-example"; #define I2C_MASTER_SCL_IO CONFIG_I2C_MASTER_SCL /*!< GPIO number used for I2C master clock */ #define I2C_MASTER_SDA_IO CONFIG_I2C_MASTER_SDA /*!< GPIO number used for I2C master data */ -#define I2C_MASTER_NUM 0 /*!< I2C master i2c port number, the number of i2c peripheral interfaces available will depend on the chip */ +#define I2C_MASTER_NUM I2C_NUM_0 /*!< I2C master i2c port number, the number of i2c peripheral interfaces available will depend on the chip */ #define I2C_MASTER_FREQ_HZ 400000 /*!< I2C master clock frequency */ #define I2C_MASTER_TX_BUF_DISABLE 0 /*!< I2C master doesn't need buffer */ #define I2C_MASTER_RX_BUF_DISABLE 0 /*!< I2C master doesn't need buffer */ @@ -41,6 +41,8 @@ static const char *TAG = "i2c-simple-example"; #define I2C_ACKS 0x1 #define I2C_ACKM 0x0 #define I2C_NOACKM 0x1 // I2C NACK value +#define I2C_WRITE_BIT I2C_MASTER_WRITE +#define I2C_RED_BIT I2C_MASTER_READ #define MPU9250_SENSOR_ADDR 0x76 /*!< Slave address of the MPU9250 sensor */ #define MPU9250_WHO_AM_I_REG_ADDR 0xD0 /*!< Register addresses of the "who am I" register */