diff --git a/libraries/Wire/Wire.h b/libraries/Wire/Wire.h index ab7ccae60..baec2c8c0 100644 --- a/libraries/Wire/Wire.h +++ b/libraries/Wire/Wire.h @@ -106,6 +106,23 @@ class TwoWire : public Stream //static const uint32_t XMIT_TIMEOUT = 100000; }; -extern TwoWire Wire; +#if WIRE_INTERFACES_COUNT > 0 + extern TwoWire Wire; +#endif +#if WIRE_INTERFACES_COUNT > 1 + extern TwoWire Wire1; +#endif +#if WIRE_INTERFACES_COUNT > 2 + extern TwoWire Wire2; +#endif +#if WIRE_INTERFACES_COUNT > 3 + extern TwoWire Wire3; +#endif +#if WIRE_INTERFACES_COUNT > 4 + extern TwoWire Wire4; +#endif +#if WIRE_INTERFACES_COUNT > 5 + extern TwoWire Wire5; +#endif #endif