1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-06-06 05:21:22 +03:00

fix I2C case where using different pins would not work with libs calling begin internally

if you call Wire.begin(new_sda, new_scl) and your library calls
internally Wire.begin() this will overwrite the SDA,SCL pins to the
default ones
This commit is contained in:
John Doe 2015-06-20 21:57:09 +03:00
parent 5baed4061e
commit 80d5508b73

View File

@ -55,6 +55,8 @@ TwoWire::TwoWire(){}
// Public Methods //////////////////////////////////////////////////////////////
void TwoWire::begin(int sda, int scl){
default_sda_pin = sda;
default_scl_pin = scl;
twi_init(sda, scl);
flush();
}