remove useless pinMode from i2c_deinit()
This commit is contained in:
parent
81c444670e
commit
6b45669aeb
18
src/i2c.cpp
18
src/i2c.cpp
@ -7,12 +7,7 @@ static const char TAG[] = __FILE__;
|
||||
|
||||
void i2c_init(void) { Wire.begin(MY_DISPLAY_SDA, MY_DISPLAY_SCL, 100000); }
|
||||
|
||||
void i2c_deinit(void) {
|
||||
Wire.~TwoWire(); // shutdown/power off I2C hardware
|
||||
// configure pins as input to save power, because Wire.end() enables pullups
|
||||
pinMode(MY_DISPLAY_SDA, INPUT);
|
||||
pinMode(MY_DISPLAY_SCL, INPUT);
|
||||
}
|
||||
void i2c_deinit(void) { Wire.~TwoWire(); }
|
||||
|
||||
void i2c_scan(void) {
|
||||
|
||||
@ -38,10 +33,13 @@ void i2c_scan(void) {
|
||||
|
||||
BBI2C bbi2c;
|
||||
|
||||
const char *szNames[] = {"Unknown","SSD1306","SH1106","VL53L0X","BMP180", "BMP280","BME280",
|
||||
"MPU-60x0", "MPU-9250", "MCP9808","LSM6DS3", "ADXL345", "ADS1115","MAX44009",
|
||||
"MAG3110", "CCS811", "HTS221", "LPS25H", "LSM9DS1","LM8330", "DS3231", "LIS3DH",
|
||||
"LIS3DSH","INA219","SHT3X","HDC1080","MPU6886","BME680", "AXP202", "AXP192", "24AA02XEXX", "DS1307"};
|
||||
const char *szNames[] = {
|
||||
"Unknown", "SSD1306", "SH1106", "VL53L0X", "BMP180", "BMP280",
|
||||
"BME280", "MPU-60x0", "MPU-9250", "MCP9808", "LSM6DS3", "ADXL345",
|
||||
"ADS1115", "MAX44009", "MAG3110", "CCS811", "HTS221", "LPS25H",
|
||||
"LSM9DS1", "LM8330", "DS3231", "LIS3DH", "LIS3DSH", "INA219",
|
||||
"SHT3X", "HDC1080", "MPU6886", "BME680", "AXP202", "AXP192",
|
||||
"24AA02XEXX", "DS1307"};
|
||||
|
||||
ESP_LOGI(TAG, "Starting I2C bus scan...");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user