Skip to content

Commit b5e0ebf

Browse files
committed
Set Wire to use the pins defined in pins_arduino.h
thanks @ladyada
1 parent 2cc1a6a commit b5e0ebf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

Diff for: libraries/Wire/src/Wire.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,15 +47,15 @@ void TwoWire::begin(int sdaPin, int sclPin, uint32_t frequency)
4747
{
4848
if(sdaPin < 0) {
4949
if(num == 0) {
50-
sdaPin = I2C0_DEFAULT_SDA_PIN;
50+
sdaPin = SDA;
5151
} else {
5252
return;
5353
}
5454
}
5555

5656
if(sclPin < 0) {
5757
if(num == 0) {
58-
sclPin = I2C0_DEFAULT_SCL_PIN;
58+
sclPin = SCL;
5959
} else {
6060
return;
6161
}

Diff for: libraries/Wire/src/Wire.h

-2
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,6 @@
2929
#include "freertos/queue.h"
3030

3131
#define I2C_BUFFER_LENGTH 128
32-
#define I2C0_DEFAULT_SDA_PIN 21
33-
#define I2C0_DEFAULT_SCL_PIN 22
3432

3533
class TwoWire
3634
{

0 commit comments

Comments
 (0)