Add FYSETC 2.42 inch OLED support (#18485)

This commit is contained in:
George Fu
2020-07-03 09:33:52 +08:00
committed by GitHub
parent e401b0c8ee
commit 097347b575
6 changed files with 108 additions and 51 deletions

View File

@ -246,7 +246,7 @@ void MarlinUI::init_lcd() {
OUT_WRITE(LCD_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT)); // Illuminate after reset or right away
#endif
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306)
#if EITHER(MKS_12864OLED, MKS_12864OLED_SSD1306, FYSETC_242_OLED_12864)
SET_OUTPUT(LCD_PINS_DC);
#ifndef LCD_RESET_PIN
#define LCD_RESET_PIN LCD_PINS_RS

View File

@ -123,6 +123,18 @@
#define U8G_CLASS U8GLIB_SH1106_128X64 // 8 stripes
#endif
#elif ENABLED(FYSETC_242_OLED_12864)
// FYSETC OLED 2.42" 128 × 64 FULL GRAPHICS CONTROLLER
#define FORCE_SOFT_SPI // SW-SPI
#if ENABLED(ALTERNATIVE_LCD)
#define U8G_CLASS U8GLIB_SSD1306_128X64_2X // 4 stripes
#else
#define U8G_CLASS U8GLIB_SSD1306_128X64 // 8 stripes
#endif
#elif ENABLED(U8GLIB_SH1106)
// Generic SH1106 OLED I2C LCD