U8g2 and U8x8 constructors
For the display on the BSFrance LoRaM3-D boards, the following U8g2 and U8x8 constructors can be used (they use hardware I2C).
Tip: Use default values / automatic configuration where possible.
For U8x8:
// No need to specify SCL and SDA, the default values
// are already defined in the board definition.
U8X8_SSD1306_128X64_NONAME_HW_I2C display(/*reset*/ PB5);
// This is in fact identical to the above.
U8X8_SSD1306_128X64_NONAME_HW_I2C display(/*reset*/ PB5, /*clock*/ SCL, /*data*/ SDA);
// Same as above but explicitly specifies the GPIO ports to use for SCL and SDA.
U8X8_SSD1306_128X64_NONAME_HW_I2C display(/*reset*/ PB5, /*clock*/ PB6, /*data*/ PB7);
For U8g2 (using full buffer):
// No need to specify SCL and SDA, the default values
// are already defined in the board definition.
U8G2_SSD1306_128X64_NONAME_F_HW_I2C display(U8G2_R0, /*reset*/ PB5);
// This is in fact identical to the above.
U8G2_SSD1306_128X64_NONAME_F_HW_I2C display(U8G2_R0, /*reset*/ PB5, /*clock*/ SCL, /*data*/ SDA);
// Same as above but explicitly specifies the GPIO ports to use for SCL and SDA.
U8G2_SSD1306_128X64_NONAME_F_HW_I2C display(U8G2_R0, /*reset*/ PB5, /*clock*/ PB6, /*data*/ PB7);