This commit is contained in:
2024-06-16 08:48:52 +03:00
parent 236feb1140
commit 92a6e4362a
2 changed files with 83 additions and 70 deletions

View File

@ -2,11 +2,12 @@
#include "esp_err.h"
#include "esp_log.h"
#include "driver/i2c.h"
#ifdef CONFIG_IDF_TARGET_ESP8266
#include "driver/i2c_master.h"
// #include "driver/i2c.h"
// #ifdef CONFIG_IDF_TARGET_ESP8266
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#endif
// #endif
/**
* @brief Default values for zh_bh1750_init_config_t structure for initial initialization of the sensor.
@ -51,6 +52,7 @@ extern "C"
ONE_TIME // One time measurement. Sensor is power down after measurement.
} work_mode;
bool i2c_port; // I2C port.
i2c_master_bus_handle_t i2c_handle;
} zh_bh1750_init_config_t;
/**