Skip to content
7 changes: 7 additions & 0 deletions libraries/Wire/src/Wire.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ TwoWire::TwoWire(uint8_t sda, uint8_t scl)

// Public Methods //////////////////////////////////////////////////////////////

void TwoWire::begin(uint8_t sda, uint8_t scl)
{
_i2c.sda = digitalPinToPinName(sda);
_i2c.scl = digitalPinToPinName(scl);
begin();
}

void TwoWire::begin(bool generalCall)
{
begin(MASTER_ADDRESS, generalCall);
Expand Down
1 change: 1 addition & 0 deletions libraries/Wire/src/Wire.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ class TwoWire : public Stream {
_i2c.sda = sda;
};
void begin(bool generalCall = false);
void begin(uint8_t, uint8_t);
void begin(uint8_t, bool generalCall = false);
void begin(int, bool generalCall = false);
void end();
Expand Down