@@ -117,6 +117,22 @@ class WipperSnapper_I2C_Driver_Out_SH1107
117117 WS_DEBUG_PRINT (" SH1107 text size: " );
118118 WS_DEBUG_PRINTLN (text_size);
119119 }
120+ /* !
121+ @brief Configures a SSD1306 OLED display. Must be called before driver
122+ begin() - This is a fake function to match the SSD1306 interface.
123+ @param width
124+ The width of the display in pixels.
125+ @param height
126+ The height of the display in pixels.
127+ @param text_size
128+ The magnification factor for the text size.
129+ */
130+ void ConfigureSSD1306 (uint8_t width, uint8_t height,
131+ uint8_t text_size) {
132+ // This is a SH1107, not a SSD1306, so we don't need to do anything here.
133+ ConfigureSH1107 (width, height, text_size);
134+ }
135+
120136
121137 /* !
122138 @brief Writes a message to the SH1107 display.
@@ -173,6 +189,20 @@ class WipperSnapper_I2C_Driver_Out_SH1107
173189 }
174190 }
175191
192+
193+ /* !
194+ @brief Writes a message to the fake "SSD1306" SH1107 display.
195+ @param msg_write
196+ Pointer to a wippersnapper_i2c_v1_SSD1306Write message.
197+ */
198+ void WriteMessageSSD1306 (wippersnapper_i2c_v1_SSD1306Write *msg_write) {
199+ if (_display == nullptr )
200+ return ;
201+ WS_DEBUG_PRINT (" SH1107 Message:" );
202+ WS_DEBUG_PRINTLN (msg_write->message );
203+ WriteMessageSH1107 (msg_write->message );
204+ }
205+
176206protected:
177207 Adafruit_SH1107 *_display =
178208 nullptr ; // /< Pointer to the Adafruit_SH1107 object
0 commit comments