This is an extract from SSD1306AsciiWire.h in the SSD1306Ascii library:
#include "SSD1306Ascii.h"
/**
* @class SSD1306AsciiWire
* @brief Class for I2C displays using Wire.
*/
class SSD1306AsciiWire : public SSD1306Ascii {
public:
#if MULTIPLE_I2C_PORTS
/**
* @brief Initialize object on specific I2C bus.
*
* @param[in] bus The I2C bus to be used.
*/
explicit SSD1306AsciiWire(decltype(Wire)& bus = Wire) : m_oledWire(bus) {}
#else // MULTIPLE_I2C_PORTS
#define m_oledWire Wire
#endif // MULTIPLE_I2C_PORTS
I think this means I can tell the library to use Wire1, Wire2 etc if MULTIPLE_I2C_PORTS has been defined.
I'm trying to use this on Teensy 3.6 where MULTIPLE_I2C_PORTS is defined, but I can't figure out the correct syntax.
For example this compiles and uses the default I2C bus on Wire no problems:
SSD1306AsciiWire oled;
but this won't even compile:
SSD1306AsciiWire(&Wire2) oled;
suggestions?