mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 02:11:56 +00:00
.
This commit is contained in:
@@ -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_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_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_FREQ_HZ 400000 /*!< I2C master clock frequency */
|
||||||
#define I2C_MASTER_TX_BUF_DISABLE 0 /*!< I2C master doesn't need buffer */
|
#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 */
|
#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_ACKS 0x1
|
||||||
#define I2C_ACKM 0x0
|
#define I2C_ACKM 0x0
|
||||||
#define I2C_NOACKM 0x1 // I2C NACK value
|
#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_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 */
|
#define MPU9250_WHO_AM_I_REG_ADDR 0xD0 /*!< Register addresses of the "who am I" register */
|
||||||
|
Reference in New Issue
Block a user