Closed mengguang closed 3 years ago
Thanks for this suggestion. Can you please explain your use case.
If I want to skip Wire.begin in the display library , I should write:
SH1106Wire display(OLED_I2C_ADDR, -1, -1);
or
SH1106Wire display(OLED_I2C_ADDR);
But :
_sda is type of uint8_t
then:
_sda = -1 give sda == 255
so sda != -1 return true and the library will call Wire.begin.
BTW: SSD1306Wire works fine this way already.
Change sda and scl to int type, so sda != -1 works.