mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-07-27 19:57:38 +00:00
[Libs] Avoid using Wire.begin()
This commit is contained in:
@@ -82,7 +82,7 @@ void Sodaq_UBlox_GPS::resetValues()
|
||||
void Sodaq_UBlox_GPS::init(int8_t enable_pin)
|
||||
{
|
||||
_enablePin = enable_pin;
|
||||
Wire.begin();
|
||||
// Wire.begin(); ESPEasy has already taken care of this
|
||||
digitalWrite(_enablePin, GPS_ENABLE_OFF);
|
||||
pinMode(_enablePin, OUTPUT);
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ void Sodaq_UBlox_GPS::resetValues()
|
||||
void Sodaq_UBlox_GPS::init(int8_t enable_pin)
|
||||
{
|
||||
_enablePin = enable_pin;
|
||||
Wire.begin();
|
||||
// Wire.begin(); ESPEasy has already taken care of this
|
||||
digitalWrite(_enablePin, GPS_ENABLE_OFF);
|
||||
pinMode(_enablePin, OUTPUT);
|
||||
}
|
||||
|
||||
@@ -55,9 +55,9 @@ ADXL345::ADXL345(int CS) {
|
||||
}
|
||||
|
||||
void ADXL345::powerOn() {
|
||||
if (I2C) {
|
||||
Wire.begin(); // If in I2C Mode Only
|
||||
}
|
||||
// if (I2C) {
|
||||
// Wire.begin(); // If in I2C Mode Only ESPEasy has already taken care of this
|
||||
// }
|
||||
|
||||
// ADXL345 TURN ON
|
||||
writeTo(ADXL345_POWER_CTL, 0); // Wakeup
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
_scl(scl) {}
|
||||
|
||||
bool SH1106Wire::connect() {
|
||||
Wire.begin(this->_sda, this->_scl);
|
||||
// Wire.begin(this->_sda, this->_scl); // ESPEasy already has Wire initialized properly
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
}
|
||||
|
||||
bool SSD1306Wire::connect() {
|
||||
Wire.begin(this->_sda, this->_scl);
|
||||
// Wire.begin(this->_sda, this->_scl); // ESPEasy already has Wire initialized properly
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user