Skip to content

Commit

Permalink
Fixed problem with master mode. (#32)
Browse files Browse the repository at this point in the history
The library incorrectly started the slave constructor instead of master.
  • Loading branch information
JakubRybakowski authored Apr 11, 2022
1 parent fd39055 commit ef59705
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion PCF8574.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ PCF8574::PCF8574(const uint8_t deviceAddress, TwoWire *wire)


#if defined (ESP8266) || defined(ESP32)
bool PCF8574::begin(uint8_t dataPin, uint8_t clockPin, uint8_t value)
bool PCF8574::begin(int dataPin, int clockPin, uint8_t value)
{
_wire = &Wire;
if ((dataPin < 255) && (clockPin < 255))
Expand Down
2 changes: 1 addition & 1 deletion PCF8574.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class PCF8574
explicit PCF8574(const uint8_t deviceAddress = 0x20, TwoWire *wire = &Wire);

#if defined (ESP8266) || defined(ESP32)
bool begin(uint8_t sda, uint8_t scl, uint8_t value = PCF8574_INITIAL_VALUE);
bool begin(int sda, int scl, uint8_t value = PCF8574_INITIAL_VALUE);
#endif
bool begin(uint8_t value = PCF8574_INITIAL_VALUE);
bool isConnected();
Expand Down

0 comments on commit ef59705

Please sign in to comment.