Skip to content

Commit

Permalink
Wire endTransmission() fix for issue #1725 (#1888)
Browse files Browse the repository at this point in the history
* removed uint8_t Wire.endTransmission(uint8_t sendStop)

Having both endTransmission(bool) and endTransmission(uint8_t) creates problems.
There is no need for endTransmission(uint8_t)
endTransmission(1) and endTransmission(0) works with endTransmission(bool).
Removing endTransmission(uint8_t) allows the ESP32 code to be compatible with
all the other Arduino cores by allowing endTransmission(1) and endTranmission(0)
to work as it does on all the other cores.

* Wire library version bump for endTransmission() update
  • Loading branch information
bperrybap authored and me-no-dev committed Nov 19, 2018
1 parent f12df4c commit deaf339
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 7 deletions.
2 changes: 1 addition & 1 deletion libraries/Wire/library.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name=Wire
version=1.0
version=1.0.1
author=Hristo Gochkov
maintainer=Hristo Gochkov <[email protected]>
sentence=Allows the communication between devices or sensors connected via Two Wire Interface Bus. For esp8266 boards.
Expand Down
5 changes: 0 additions & 5 deletions libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -308,11 +308,6 @@ uint8_t TwoWire::endTransmission(void)
return endTransmission(true);
}

uint8_t TwoWire::endTransmission(uint8_t sendStop)
{
return endTransmission(static_cast<bool>(sendStop));
}

/* stickbreaker Nov2017 better error reporting
*/
uint8_t TwoWire::lastError()
Expand Down
1 change: 0 additions & 1 deletion libraries/Wire/src/Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ class TwoWire: public Stream
void beginTransmission(int address);

uint8_t endTransmission(bool sendStop);
uint8_t endTransmission(uint8_t sendStop);
uint8_t endTransmission(void);

uint8_t requestFrom(uint16_t address, uint8_t size, bool sendStop);
Expand Down

0 comments on commit deaf339

Please sign in to comment.