Skip to content

Commit d2eda03

Browse files
committed
Remove Wire.begin() from begin()
1 parent ab32ea0 commit d2eda03

File tree

1 file changed

+12
-11
lines changed

1 file changed

+12
-11
lines changed

src/SparkFunBME280.cpp

+12-11
Original file line numberDiff line numberDiff line change
@@ -71,17 +71,18 @@ uint8_t BME280::begin()
7171

7272
case I2C_MODE:
7373

74-
switch(_wireType)
75-
{
76-
case(HARD_WIRE):
77-
_hardPort->begin(); //The caller can begin their port and set the speed. We just confirm it here otherwise it can be hard to debug.
78-
break;
79-
case(SOFT_WIRE):
80-
#ifdef SoftwareWire_h
81-
_softPort->begin(); //The caller can begin their port and set the speed. We just confirm it here otherwise it can be hard to debug.
82-
#endif
83-
break;
84-
}
74+
//Removing port begin from library. This should be done by user otherwise this library will overwrite Wire settings such as clock speed.
75+
// switch(_wireType)
76+
// {
77+
// case(HARD_WIRE):
78+
// _hardPort->begin(); //The caller can begin their port and set the speed. We just confirm it here otherwise it can be hard to debug.
79+
// break;
80+
// case(SOFT_WIRE):
81+
// #ifdef SoftwareWire_h
82+
// _softPort->begin(); //The caller can begin their port and set the speed. We just confirm it here otherwise it can be hard to debug.
83+
// #endif
84+
// break;
85+
// }
8586
break;
8687

8788
case SPI_MODE:

0 commit comments

Comments
 (0)