Skip to content
This repository was archived by the owner on Apr 16, 2021. It is now read-only.

Commit 12986a1

Browse files
committed
Wire: use proper WIRE_HOWMANY define
Fixes #93
1 parent 19ddd21 commit 12986a1

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

libraries/Wire/Wire.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -123,9 +123,9 @@ void arduino::MbedI2C::onReceive(void(*)(int)) {}
123123
void arduino::MbedI2C::onRequest(void(*)(void)) {}
124124

125125

126-
#if DEVICE_I2C > 0
126+
#if WIRE_HOWMANY > 0
127127
arduino::MbedI2C Wire(I2C_SDA, I2C_SCL);
128128
#endif
129-
#if DEVICE_I2C > 1
129+
#if WIRE_HOWMANY > 1
130130
arduino::MbedI2C Wire1(I2C_SDA1, I2C_SCL1);;
131-
#endif
131+
#endif

libraries/Wire/Wire.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ class MbedI2C : public HardwareI2C
6767

6868
}
6969

70-
#if DEVICE_I2C > 0
70+
#if WIRE_HOWMANY > 0
7171
extern arduino::MbedI2C Wire;
7272
#endif
73-
#if DEVICE_I2C > 1
73+
#if WIRE_HOWMANY > 1
7474
extern arduino::MbedI2C Wire1;
7575
#endif
7676

77-
typedef arduino::MbedI2C TwoWire;
77+
typedef arduino::MbedI2C TwoWire;

0 commit comments

Comments
 (0)