[2.0.x] Adding support for using the MKS_12864OLED with the SSD1306 controller (#8814)

* Adding support for using the MKS_12864OLED with the SSD1306 controller

* Update comment for correct controller type
This commit is contained in:
Dan Delaney 2017-12-16 18:47:04 -06:00 committed by Scott Lahteine
parent 2690ce7a96
commit b055d8c39c
6 changed files with 26 additions and 8 deletions

View file

@ -1625,12 +1625,14 @@
//#define CR10_STOCKDISPLAY
//
// MKS OLED 1.3" 128 × 64 FULL GRAPHICS CONTROLLER
// MKS OLED 1.3" 128x64 FULL GRAPHICS CONTROLLER
// http://reprap.org/wiki/MKS_12864OLED
//
// Tiny, but very sharp OLED display
//
//#define MKS_12864OLED
// If there is a pixel shift, try the other controller.
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
//
// AZSMZ 12864 LCD with SD

View file

@ -130,6 +130,11 @@
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define U8GLIB_SH1106
#elif ENABLED(MKS_12864OLED_SSD1306)
#define REPRAP_DISCOUNT_SMART_CONTROLLER
#define U8GLIB_SSD1306
#elif ENABLED(MKS_MINI_12864)
#define MINIPANEL

View file

@ -1289,6 +1289,7 @@ static_assert(1 >= 0
* REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER => REPRAP_DISCOUNT_SMART_CONTROLLER
* SAV_3DGLCD => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
* MKS_12864OLED => U8GLIB_SH1106 => ULTIMAKERCONTROLLER
* MKS_12864OLED_SSD1306 => U8GLIB_SSD1306 => ULTIMAKERCONTROLLER
* miniVIKI => ULTIMAKERCONTROLLER
* VIKI2 => ULTIMAKERCONTROLLER
* ELB_FULL_GRAPHIC_CONTROLLER => ULTIMAKERCONTROLLER
@ -1303,14 +1304,16 @@ static_assert(1 >= 0
&& DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
&& DISABLED(AZSMZ_12864) \
&& DISABLED(PANEL_ONE) \
&& DISABLED(MKS_12864OLED)
&& DISABLED(MKS_12864OLED) \
&& DISABLED(MKS_12864OLED_SSD1306)
+ 1
#endif
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER) \
&& DISABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \
&& DISABLED(LCD_FOR_MELZI) \
&& DISABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602) \
&& DISABLED(MKS_12864OLED)
&& DISABLED(MKS_12864OLED) \
&& DISABLED(MKS_12864OLED_SSD1306)
+ 1
#endif
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) \
@ -1323,6 +1326,9 @@ static_assert(1 >= 0
#if ENABLED(MKS_12864OLED)
+ 1
#endif
#if ENABLED(MKS_12864OLED_SSD1306)
+ 1
#endif
#if ENABLED(MAKEBOARD_MINI_2_LINE_DISPLAY_1602)
+ 1
#endif
@ -1382,7 +1388,7 @@ static_assert(1 >= 0
#if ENABLED(LCD_I2C_VIKI)
+ 1
#endif
#if ENABLED(U8GLIB_SSD1306) && DISABLED(OLED_PANEL_TINYBOY2)
#if ENABLED(U8GLIB_SSD1306) && DISABLED(OLED_PANEL_TINYBOY2) && DISABLED(MKS_12864OLED_SSD1306)
+ 1
#endif
#if ENABLED(SAV_3DLCD)

View file

@ -195,6 +195,11 @@
//U8GLIB_64128N_2X_HAL u8g(DOGLCD_CS, DOGLCD_A0); // using HW-SPI
U8GLIB_64128N_2X_HAL u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI
#elif ENABLED(MKS_12864OLED_SSD1306)
// MKS 128x64 (SSD1306) OLED I2C LCD
U8GLIB_SSD1306_128X64 u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 8 stripes
//U8GLIB_SSD1306_128X64_2X u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // 4 stripes
#elif ENABLED(U8GLIB_SSD1306)
// Generic support for SSD1306 OLED I2C LCDs
//U8GLIB_SSD1306_128X64_2X_I2C_2_WIRE u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 4 stripes

View file

@ -339,7 +339,7 @@
#else
#if ENABLED(MKS_12864OLED)
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
#define LCD_PINS_DC 25 // Set as output on init
#define LCD_PINS_RS 27 // Pull low for 1s to init
// DOGM SPI LCD Support

View file

@ -76,7 +76,7 @@
#undef E1_CS_PIN
#if ENABLED(ULTRA_LCD) && DISABLED(REPRAPWORLD_GRAPHICAL_LCD) && (DISABLED(NEWPANEL) || DISABLED(PANEL_ONE)) && DISABLED(CR10_STOCKDISPLAY)
#if DISABLED(MKS_12864OLED)
#if DISABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
#undef LCD_PINS_RS
#define LCD_PINS_RS 42 // 3DYMY boards pin 16 -> 42
#undef LCD_PINS_ENABLE