Merge pull request #8813 from drdelaney/bugfix-1.1.x

[1.1.x] Adding support for using the MKS_12864OLED with the SSD1306 controller
master
Scott Lahteine 7 years ago committed by GitHub
commit 76b0df6ba1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -125,6 +125,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

@ -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
// If there is a pixel shift, try the other controller.
//
//#define MKS_12864OLED
//#define MKS_12864OLED // Uses the SH1106 controller (default)
//#define MKS_12864OLED_SSD1306 // Uses the SSD1306 controller
// Silvergate GLCD controller
// http://github.com/android444/Silvergate

@ -14515,7 +14515,7 @@ void setup() {
pe_deactivate_magnet(1);
#endif
#endif
#if ENABLED(MKS_12864OLED)
#if ENABLED(MKS_12864OLED) || ENABLED(MKS_12864OLED_SSD1306)
SET_OUTPUT(LCD_PINS_DC);
OUT_WRITE(LCD_PINS_RS, LOW);
delay(1000);

@ -1275,6 +1275,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
@ -1287,14 +1288,16 @@ static_assert(1 >= 0
&& DISABLED(VIKI2) \
&& DISABLED(ELB_FULL_GRAPHIC_CONTROLLER) \
&& 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) \
@ -1307,6 +1310,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
@ -1363,7 +1369,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)

@ -334,7 +334,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

@ -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

@ -187,6 +187,10 @@
// U8GLIB_ST7565_64128n_2x_VIKI u8g(0); // using SW-SPI DOGLCD_MOSI != -1 && DOGLCD_SCK
U8GLIB_ST7565_64128n_2x_VIKI u8g(DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0); // using SW-SPI
//U8GLIB_NHD_C12864_2X u8g(DOGLCD_CS, DOGLCD_A0); // 4 stripes HWSPI
#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 u8g(U8G_I2C_OPT_NONE | U8G_I2C_OPT_FAST); // 8 stripes

Loading…
Cancel
Save