Browse Source

Fix, improve FYSETC_MINI_12864 support (#13730)

pull/1/head
jmdearras 6 years ago
committed by Scott Lahteine
parent
commit
b65cb5704d
  1. 7
      Marlin/src/HAL/HAL_LPC1768/SanityCheck.h
  2. 2
      Marlin/src/inc/Conditionals_LCD.h
  3. 7
      Marlin/src/inc/SanityCheck.h
  4. 2
      Marlin/src/lcd/dogm/ultralcd_DOGM.h
  5. 49
      Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h
  6. 28
      Marlin/src/pins/pins_FYSETC_F6_13.h

7
Marlin/src/HAL/HAL_LPC1768/SanityCheck.h

@ -66,12 +66,7 @@
#endif #endif
#endif // SPINDLE_LASER_ENABLE #endif // SPINDLE_LASER_ENABLE
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) \ #if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
&& (MB(RAMPS_14_RE_ARM_EFB) \
|| MB(RAMPS_14_RE_ARM_EEB) \
|| MB(RAMPS_14_RE_ARM_EFF) \
|| MB(RAMPS_14_RE_ARM_EEF) \
|| MB(RAMPS_14_RE_ARM_SF))
#error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI" #error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
#endif #endif

2
Marlin/src/inc/Conditionals_LCD.h

@ -562,3 +562,5 @@
#if ENABLED(SLIM_LCD_MENUS) #if ENABLED(SLIM_LCD_MENUS)
#define BOOT_MARLIN_LOGO_SMALL #define BOOT_MARLIN_LOGO_SMALL
#endif #endif
#define IS_RE_ARM_BOARD (MB(RAMPS_14_RE_ARM_EFB) || MB(RAMPS_14_RE_ARM_EEB) || MB(RAMPS_14_RE_ARM_EFF) || MB(RAMPS_14_RE_ARM_EEF) || MB(RAMPS_14_RE_ARM_SF))

7
Marlin/src/inc/SanityCheck.h

@ -1786,6 +1786,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
#error "Please select no more than one LCD controller option." #error "Please select no more than one LCD controller option."
#endif #endif
/**
* Fysetc Mini 12864 requirements
*/
#if ENABLED(FYSETC_MINI_12864) && DISABLED(LED_USER_PRESET_STARTUP)
#error "FYSETC_MINI_12864 requires LED_USER_PRESET_STARTUP to enable the backlight on startup."
#endif
/** /**
* Check existing CS pins against enabled TMC SPI drivers. * Check existing CS pins against enabled TMC SPI drivers.
*/ */

2
Marlin/src/lcd/dogm/ultralcd_DOGM.h

@ -112,7 +112,7 @@
//#define U8G_CLASS U8GLIB_MINI12864 //#define U8G_CLASS U8GLIB_MINI12864
//#define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 8 stripes //#define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 8 stripes
#define U8G_CLASS U8GLIB_MINI12864_2X #define U8G_CLASS U8GLIB_MINI12864_2X
#if EITHER(FYSETC_MINI_12864, TARGET_LPC1768) #if ENABLED(FYSETC_MINI_12864) && DOGLCD_SCK > 0
#define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // 4 stripes SW-SPI #define U8G_PARAM DOGLCD_SCK, DOGLCD_MOSI, DOGLCD_CS, DOGLCD_A0 // 4 stripes SW-SPI
#else #else
#define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 4 stripes HW-SPI #define U8G_PARAM DOGLCD_CS, DOGLCD_A0 // 4 stripes HW-SPI

49
Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h

@ -190,28 +190,51 @@
#define LCD_PINS_D4 P1_21 #define LCD_PINS_D4 P1_21
#else #else
#define LCD_PINS_RS P1_19 #define LCD_PINS_RS P1_19
#define BTN_EN1 P3_26 // (31) J3-2 & AUX-4 #define BTN_EN1 P3_26 // (31) J3-2 & AUX-4
#define BTN_EN2 P3_25 // (33) J3-4 & AUX-4 #define BTN_EN2 P3_25 // (33) J3-4 & AUX-4
#define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant)
#define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
#define LCD_PINS_ENABLE P1_18 #define LCD_PINS_ENABLE P1_18
#define LCD_PINS_D4 P1_20 #define LCD_PINS_D4 P1_20
#if ENABLED(ULTIPANEL) #define LCD_SDSS P0_16 // (16) J3-7 & AUX-4
#define LCD_PINS_D5 P1_21 #define SD_DETECT_PIN P1_31 // (49) (NOT 5V tolerant)
#define LCD_PINS_D6 P1_22
#define LCD_PINS_D7 P1_23
#endif
#if ENABLED(MKS_MINI_12864) #if ENABLED(FYSETC_MINI_12864)
#define DOGLCD_CS P1_21 #define DOGLCD_CS P1_18
#define DOGLCD_A0 P1_22 #define DOGLCD_A0 P1_19
#endif #define LCD_RESET_PIN P1_20
#define LCD_BACKLIGHT_PIN -1
#define RGB_LED
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN P1_21
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN P1_22
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN P1_23
#endif
#ifndef RGB_LED_W_PIN
#define RGB_LED_W_PIN -1
#endif
#else
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS P1_21
#define DOGLCD_A0 P1_22
#endif
#if ENABLED(ULTIPANEL)
#define LCD_PINS_D5 P1_21
#define LCD_PINS_D6 P1_22
#define LCD_PINS_D7 P1_23
#endif
#endif // FYSETC_MINI_12864
#endif #endif

28
Marlin/src/pins/pins_FYSETC_F6_13.h

@ -184,11 +184,6 @@
#define BEEPER_PIN 37 #define BEEPER_PIN 37
#define SD_DETECT_PIN 49 #define SD_DETECT_PIN 49
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_A0 27
#define DOGLCD_CS 25
#endif
#if ENABLED(FYSETC_MINI_12864) #if ENABLED(FYSETC_MINI_12864)
// //
// See https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8 // See https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
@ -205,6 +200,10 @@
#define RGB_LED_B_PIN 29 #define RGB_LED_B_PIN 29
#endif #endif
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN 23
#define KILL_PIN 41
#elif HAS_GRAPHICAL_LCD #elif HAS_GRAPHICAL_LCD
#define LCD_PINS_RS 16 #define LCD_PINS_RS 16
@ -214,6 +213,11 @@
#define LCD_PINS_D6 27 #define LCD_PINS_D6 27
#define LCD_PINS_D7 29 #define LCD_PINS_D7 29
#if ENABLED(MKS_MINI_12864)
#define DOGLCD_CS 25
#define DOGLCD_A0 27
#endif
#endif #endif
#if ENABLED(NEWPANEL) #if ENABLED(NEWPANEL)
@ -222,20 +226,6 @@
#define BTN_ENC 35 #define BTN_ENC 35
#endif #endif
#if ENABLED(FYSETC_MINI_12864)
#define LCD_BACKLIGHT_PIN -1
#define LCD_RESET_PIN 23
#define KILL_PIN 41
#ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN 25
#endif
#ifndef RGB_LED_G_PIN
#define RGB_LED_G_PIN 27
#endif
#ifndef RGB_LED_B_PIN
#define RGB_LED_B_PIN 29
#endif
#endif
#ifndef RGB_LED_R_PIN #ifndef RGB_LED_R_PIN
#define RGB_LED_R_PIN 3 #define RGB_LED_R_PIN 3
#endif #endif

Loading…
Cancel
Save