Skip to content

Commit

Permalink
Fix Ender-2 display pins, add BTN_ENC (#16349)
Browse files Browse the repository at this point in the history
  • Loading branch information
greppp authored and thinkyhead committed Jan 4, 2020
1 parent b841b9b commit 7f87a04
Show file tree
Hide file tree
Showing 165 changed files with 807 additions and 17 deletions.
5 changes: 5 additions & 0 deletions Marlin/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
#define IS_RRD_SC
#define IS_U8GLIB_SSD1306

#elif ENABLED(MKS_MINI_12864)
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)

#define MINIPANEL

Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/inc/Conditionals_post.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@
#elif ENABLED(MKS_LCD12864B)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 205
#elif ENABLED(MKS_MINI_12864)
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define _LCD_CONTRAST_MIN 120
#define _LCD_CONTRAST_INIT 195
#elif ANY(FYSETC_MINI_12864_X_X, FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0, FYSETC_MINI_12864_2_1)
Expand Down
3 changes: 2 additions & 1 deletion Marlin/src/inc/SanityCheck.h
Original file line number Diff line number Diff line change
Expand Up @@ -1866,7 +1866,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ (ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && DISABLED(IS_RRD_FG_SC)) \
+ (ENABLED(ULTRA_LCD) && DISABLED(IS_ULTRA_LCD)) \
+ (ENABLED(U8GLIB_SSD1306) && DISABLED(IS_U8GLIB_SSD1306)) \
+ (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864)) \
+ (ENABLED(MINIPANEL) && DISABLED(MKS_MINI_12864, ENDER2_STOCKDISPLAY)) \
+ (ENABLED(REPRAPWORLD_KEYPAD) && DISABLED(IS_RRW_KEYPAD)) \
+ (ENABLED(EXTENSIBLE_UI) && DISABLED(IS_EXTUI)) \
+ (ENABLED(ULTIPANEL) && DISABLED(IS_ULTIPANEL)) \
Expand Down Expand Up @@ -1895,6 +1895,7 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
+ ENABLED(LCD_FOR_MELZI) \
+ ENABLED(ULTI_CONTROLLER) \
+ ENABLED(MKS_MINI_12864) \
+ ENABLED(ENDER2_STOCKDISPLAY) \
+ ENABLED(FYSETC_MINI_12864_X_X) \
+ ENABLED(FYSETC_MINI_12864_1_2) \
+ ENABLED(FYSETC_MINI_12864_2_0) \
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/u8g_dev_uc1701_mini12864_HAL.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static const uint8_t u8g_dev_uc1701_mini12864_HAL_init_seq[] PROGMEM = {
static const uint8_t u8g_dev_uc1701_mini12864_HAL_data_start[] PROGMEM = {
U8G_ESC_ADR(0), // instruction mode
U8G_ESC_CS(1), // enable chip
#if ENABLED(MKS_MINI_12864)
#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
UC1701_START_LINE(0), // set display start line to 0
UC1701_ADC_REVERSE(0), // ADC set to reverse
UC1701_OUT_MODE(1), // common output mode
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/lcd/dogm/ultralcd_DOGM.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@

#define U8G_CLASS U8GLIB_MINI12864_2X_HAL // 4 stripes

#elif ENABLED(MKS_MINI_12864)
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)

// The MKS_MINI_12864 V1/V2 aren't exact copies of the MiniPanel.
// Panel management is in u8g_dev_uc1701_mini12864_HAL.cpp with
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/linux/pins_RAMPS_LINUX.h
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@
#define SD_DETECT_PIN 49
#define KILL_PIN 41

#elif ENABLED(MKS_MINI_12864) // Added in Marlin 1.1.6
#elif ENABLED(MKS_MINI_12864)

#define DOGLCD_A0 27
#define DOGLCD_CS 25
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_1.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@
// requires jumpers on the SKR V1.1 board as documented here:
// https://www.facebook.com/groups/505736576548648/permalink/630639874058317/
#ifndef SDCARD_CONNECTION
#if ENABLED(MKS_MINI_12864)
#if EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)
#define SDCARD_CONNECTION LCD
#else
#define SDCARD_CONNECTION ONBOARD
Expand Down
24 changes: 24 additions & 0 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,11 +271,35 @@
#else // !FYSETC_MINI_12864

#if ENABLED(MKS_MINI_12864)

#define DOGLCD_CS P1_21
#define DOGLCD_A0 P1_22
#define DOGLCD_SCK P0_15
#define DOGLCD_MOSI P0_18

#elif ENABLED(ENDER2_STOCKDISPLAY)

/**
* Creality Ender-2 display pinout
* _____
* 5V | · · | GND
* (MOSI) P1_23 | · · | P1_22 (LCD_CS)
* (LCD_A0) P1_21 | · · | P1_20 (BTN_EN2)
* RESET P1.19 | · · | P1_18 (BTN_EN1)
* (BTN_ENC) P0_28 | · · | P1_30 (SCK)
* -----
* EXP1
*/

#define BTN_EN1 P1_18
#define BTN_EN2 P1_20
#define BTN_ENC P0_28
#define DOGLCD_CS P1_22
#define DOGLCD_A0 P1_21
#define DOGLCD_SCK P1_30
#define DOGLCD_MOSI P1_23
#define FORCE_SOFT_SPI
#define LCD_BACKLIGHT_PIN -1
#endif

#if ENABLED(ULTIPANEL)
Expand Down
6 changes: 3 additions & 3 deletions Marlin/src/pins/sanguino/pins_MELZI_CREALITY.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@

#include "pins_MELZI.h"

// For the stock CR-10 use the REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER
// option for the display in Configuration.h

//
// For the stock CR-10 enable CR10_STOCKDISPLAY in Configuration.h
//
#undef LCD_SDSS
#undef LED_PIN
#undef LCD_PINS_RS
Expand Down
2 changes: 1 addition & 1 deletion Marlin/src/pins/stm32/pins_BTT_SKR_E3_DIP.h
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@
#define LCD_PINS_ENABLE PB7
#define LCD_PINS_D4 PB9

#elif ENABLED(MKS_MINI_12864)
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)

/** Creality Ender-2 display pinout
* _____
Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32/pins_BTT_SKR_MINI_E3.h
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
#define LCD_PINS_D7 PB5
#define ADC_KEYPAD_PIN PA1 // Repurpose servo pin for ADC - CONNECTING TO 5V WILL DAMAGE THE BOARD!

#elif ENABLED(MKS_MINI_12864)
#elif EITHER(MKS_MINI_12864, ENDER2_STOCKDISPLAY)

/** Creality Ender-2 display pinout
* _____
Expand All @@ -163,7 +163,7 @@

#else

#error "Only CR10_STOCKDISPLAY, ZONESTAR_LCD, and MKS_MINI_12864 are currently supported on the BIGTREE_SKR_MINI_E3."
#error "Only ZONESTAR_LCD, MKS_MINI_12864, ENDER2_STOCKDISPLAY, and CR10_STOCKDISPLAY are currently supported on the BIGTREE_SKR_MINI_E3."

#endif

Expand Down
4 changes: 2 additions & 2 deletions Marlin/src/pins/stm32/pins_MKS_ROBIN_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15

#else // !MKS_MINI_12864
#else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY

#define LCD_PINS_D4 PF14
#if ENABLED(ULTIPANEL)
Expand All @@ -260,7 +260,7 @@
#define LCD_PINS_D7 PF13
#endif

#endif // !MKS_MINI_12864
#endif // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
#endif

#ifndef ST7920_DELAY_1
Expand Down
5 changes: 5 additions & 0 deletions config/default/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/3DFabXYZ/Migbot/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1989,6 +1989,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/ADIMLab/Gantry v1/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1958,6 +1958,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/ADIMLab/Gantry v2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1958,6 +1958,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/AlephObjects/TAZ4/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1977,6 +1977,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Alfawise/U20-bltouch/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2037,6 +2037,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Alfawise/U20/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2036,6 +2036,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/AliExpress/CL-260/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1957,6 +1957,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/AliExpress/UM2pExt/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1968,6 +1968,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Anet/A2/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Anet/A2plus/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1959,6 +1959,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Anet/A6/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -2074,6 +2074,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Anet/A8/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1985,6 +1985,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Anet/A8plus/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1968,6 +1968,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Anet/E10/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1960,6 +1960,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/Anet/E16/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1969,6 +1969,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/AnyCubic/i3/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1967,6 +1967,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
5 changes: 5 additions & 0 deletions config/examples/ArmEd/Configuration.h
Original file line number Diff line number Diff line change
Expand Up @@ -1958,6 +1958,11 @@
//
//#define CR10_STOCKDISPLAY

//
// Ender-2 OEM display, a variant of the MKS_MINI_12864
//
//#define ENDER2_STOCKDISPLAY

//
// ANET and Tronxy Graphical Controller
//
Expand Down
Loading

0 comments on commit 7f87a04

Please sign in to comment.