mirror of
https://github.com/esp8266/Arduino.git
synced 2025-04-19 23:22:16 +03:00
fix Wire::pins compatibility (#167)
This commit is contained in:
parent
34b09f7e23
commit
65eeac16e8
@ -45,6 +45,9 @@ uint8_t TwoWire::transmitting = 0;
|
||||
void (*TwoWire::user_onRequest)(void);
|
||||
void (*TwoWire::user_onReceive)(int);
|
||||
|
||||
static int default_sda_pin = SDA;
|
||||
static int default_scl_pin = SCL;
|
||||
|
||||
// Constructors ////////////////////////////////////////////////////////////////
|
||||
|
||||
TwoWire::TwoWire(){}
|
||||
@ -57,11 +60,12 @@ void TwoWire::begin(int sda, int scl){
|
||||
}
|
||||
|
||||
void TwoWire::pins(int sda, int scl){
|
||||
twi_init(sda, scl);
|
||||
default_sda_pin = sda;
|
||||
default_scl_pin = scl;
|
||||
}
|
||||
|
||||
void TwoWire::begin(void){
|
||||
begin(SDA, SCL);
|
||||
begin(default_sda_pin, default_scl_pin);
|
||||
}
|
||||
|
||||
void TwoWire::begin(uint8_t address){
|
||||
|
Loading…
x
Reference in New Issue
Block a user