We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34b09f7 commit 65eeac1Copy full SHA for 65eeac1
libraries/Wire/Wire.cpp
@@ -45,6 +45,9 @@ uint8_t TwoWire::transmitting = 0;
45
void (*TwoWire::user_onRequest)(void);
46
void (*TwoWire::user_onReceive)(int);
47
48
+static int default_sda_pin = SDA;
49
+static int default_scl_pin = SCL;
50
+
51
// Constructors ////////////////////////////////////////////////////////////////
52
53
TwoWire::TwoWire(){}
@@ -57,11 +60,12 @@ void TwoWire::begin(int sda, int scl){
57
60
}
58
61
59
62
void TwoWire::pins(int sda, int scl){
- twi_init(sda, scl);
63
+ default_sda_pin = sda;
64
+ default_scl_pin = scl;
65
66
67
void TwoWire::begin(void){
- begin(SDA, SCL);
68
+ begin(default_sda_pin, default_scl_pin);
69
70
71
void TwoWire::begin(uint8_t address){
0 commit comments