diff --git a/Marlin/Conditionals.h b/Marlin/Conditionals.h index 06de0f9551cf..c794684be5c1 100644 --- a/Marlin/Conditionals.h +++ b/Marlin/Conditionals.h @@ -44,6 +44,13 @@ #if ENABLED(U8GLIB_SSD1306) #define ULTRA_LCD //general LCD support, also 16x2 #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family) + #define ULTIMAKERCONTROLLER + #endif + // Generic support for SH1106 OLED based LCDs. + #if ENABLED(U8GLIB_SH1106) + #define ULTRA_LCD //general LCD support, also 16x2 + #define DOGLCD // Support for I2C LCD 128x64 (Controller SSD1306 graphic Display Family) + #define ULTIMAKERCONTROLLER #endif @@ -203,13 +210,11 @@ #endif #if ENABLED(DOGLCD) - #define HAS_LCD_CONTRAST - #if ENABLED(U8GLIB_ST7920) - #undef HAS_LCD_CONTRAST + #if ENABLED(U8GLIB_ST7920) || ENABLED(U8GLIB_SSD1306) || ENABLED(U8GLIB_SH1106) + #define HAS_LCD_CONTRAST false + #else + #define HAS_LCD_CONTRAST true #endif - #if ENABLED(U8GLIB_SSD1306) - #undef HAS_LCD_CONTRAST - #endif #endif #else // CONFIGURATION_LCD diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index dfcfaebee7d7..0146734030f1 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -726,9 +726,23 @@ const bool Z_PROBE_ENDSTOP_INVERTING = false; // set to true to invert the logic // ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib //#define U8GLIB_SSD1306 +// SH1106 OLED generic display support +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +//#define U8GLIB_SH1106 + + +// SAV OLEd LCD module support using either SSD1306 or SH1106 based LCD modules +// ==> REMEMBER TO INSTALL U8glib to your ARDUINO library folder: http://code.google.com/p/u8glib/wiki/u8glib +//#define SAV_3DGLCD +#if ENABLED(SAV_3DGLCD) + //#define U8GLIB_SSD1306 + #define U8GLIB_SH1106 +#endif + // Shift register panels // --------------------- // 2 wire Non-latching LCD SR from: + // https://bitbucket.org/fmalpartida/new-liquidcrystal/wiki/schematics#!shiftregister-connection // LCD configuration: http://reprap.org/wiki/SAV_3D_LCD //#define SAV_3DLCD diff --git a/Marlin/dogm_lcd_implementation.h b/Marlin/dogm_lcd_implementation.h index cf12a11696bc..5bd05121b9a8 100644 --- a/Marlin/dogm_lcd_implementation.h +++ b/Marlin/dogm_lcd_implementation.h @@ -125,12 +125,15 @@ #elif ENABLED(U8GLIB_LM6059_AF) // Based on the Adafruit ST7565 (http://www.adafruit.com/products/250) U8GLIB_LM6059 u8g(DOGLCD_CS, DOGLCD_A0); -#elif defined U8GLIB_SSD1306 +#elif ENABLED(U8GLIB_SSD1306) // Generic support for SSD1306 OLED I2C LCDs - U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE); + U8GLIB_SSD1306_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); +#elif ENABLED(U8GLIB_SH1106) + // Generic support for SSD1306 OLED I2C LCDs + U8GLIB_SH1106_128X64 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); #elif defined(MINIPANEL) // The MINIPanel display - U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); + U8GLIB_MINI12864 u8g(DOGLCD_CS, DOGLCD_A0); #else // for regular DOGM128 display with HW-SPI U8GLIB_DOGM128 u8g(DOGLCD_CS, DOGLCD_A0); // HW-SPI Com: CS, A0