Browse Source

Fix, improve FYSETC_MINI_12864 support (#13730)

jmdearras 6 years ago
parent
commit
b65cb5704d

+ 1
- 6
Marlin/src/HAL/HAL_LPC1768/SanityCheck.h View File

@@ -66,12 +66,7 @@
66 66
   #endif
67 67
 #endif // SPINDLE_LASER_ENABLE
68 68
 
69
-#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI) \
70
-    && (MB(RAMPS_14_RE_ARM_EFB) \
71
-    ||  MB(RAMPS_14_RE_ARM_EEB) \
72
-    ||  MB(RAMPS_14_RE_ARM_EFF) \
73
-    ||  MB(RAMPS_14_RE_ARM_EEF) \
74
-    ||  MB(RAMPS_14_RE_ARM_SF))
69
+#if IS_RE_ARM_BOARD && ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER) && HAS_DRIVER(TMC2130) && DISABLED(TMC_USE_SW_SPI)
75 70
   #error "Re-ARM with REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER and TMC2130 require TMC_USE_SW_SPI"
76 71
 #endif
77 72
 

+ 2
- 0
Marlin/src/inc/Conditionals_LCD.h View File

@@ -562,3 +562,5 @@
562 562
 #if ENABLED(SLIM_LCD_MENUS)
563 563
   #define BOOT_MARLIN_LOGO_SMALL
564 564
 #endif
565
+
566
+#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
- 0
Marlin/src/inc/SanityCheck.h View File

@@ -1787,6 +1787,13 @@ static_assert(Y_MAX_LENGTH >= Y_BED_SIZE, "Movement bounds (Y_MIN_POS, Y_MAX_POS
1787 1787
 #endif
1788 1788
 
1789 1789
 /**
1790
+ * Fysetc Mini 12864 requirements
1791
+ */
1792
+#if ENABLED(FYSETC_MINI_12864) && DISABLED(LED_USER_PRESET_STARTUP)
1793
+  #error "FYSETC_MINI_12864 requires LED_USER_PRESET_STARTUP to enable the backlight on startup."
1794
+#endif
1795
+
1796
+/**
1790 1797
  * Check existing CS pins against enabled TMC SPI drivers.
1791 1798
  */
1792 1799
 #define INVALID_TMC2130(ST) (AXIS_DRIVER_TYPE(ST, TMC2130) && !PIN_EXISTS(ST##_CS))

+ 1
- 1
Marlin/src/lcd/dogm/ultralcd_DOGM.h View File

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

+ 36
- 13
Marlin/src/pins/pins_BIGTREE_SKR_V1.3.h View File

@@ -190,28 +190,51 @@
190 190
     #define LCD_PINS_D4     P1_21
191 191
 
192 192
   #else
193
-
194 193
     #define LCD_PINS_RS     P1_19
195 194
 
196 195
     #define BTN_EN1         P3_26   // (31) J3-2 & AUX-4
197 196
     #define BTN_EN2         P3_25   // (33) J3-4 & AUX-4
198
-    #define SD_DETECT_PIN   P1_31   // (49) (NOT 5V tolerant)
199
-
200
-    #define LCD_SDSS        P0_16   // (16) J3-7 & AUX-4
201 197
 
202 198
     #define LCD_PINS_ENABLE P1_18
203 199
     #define LCD_PINS_D4     P1_20
204 200
 
205
-    #if ENABLED(ULTIPANEL)
206
-      #define LCD_PINS_D5   P1_21
207
-      #define LCD_PINS_D6   P1_22
208
-      #define LCD_PINS_D7   P1_23
209
-    #endif
201
+    #define LCD_SDSS        P0_16   // (16) J3-7 & AUX-4
202
+    #define SD_DETECT_PIN   P1_31   // (49) (NOT 5V tolerant)
210 203
 
211
-    #if ENABLED(MKS_MINI_12864)
212
-      #define DOGLCD_CS     P1_21
213
-      #define DOGLCD_A0     P1_22
214
-    #endif
204
+    #if ENABLED(FYSETC_MINI_12864)
205
+      #define DOGLCD_CS     P1_18 
206
+      #define DOGLCD_A0     P1_19
207
+      #define LCD_RESET_PIN P1_20
208
+      #define LCD_BACKLIGHT_PIN -1
209
+
210
+      #define RGB_LED
211
+      #ifndef RGB_LED_R_PIN
212
+        #define RGB_LED_R_PIN P1_21
213
+      #endif
214
+      #ifndef RGB_LED_G_PIN
215
+        #define RGB_LED_G_PIN P1_22
216
+      #endif
217
+      #ifndef RGB_LED_B_PIN
218
+        #define RGB_LED_B_PIN P1_23
219
+      #endif
220
+      #ifndef RGB_LED_W_PIN
221
+        #define RGB_LED_W_PIN -1
222
+      #endif
223
+
224
+    #else
225
+
226
+      #if ENABLED(MKS_MINI_12864)
227
+        #define DOGLCD_CS     P1_21
228
+        #define DOGLCD_A0     P1_22
229
+      #endif
230
+
231
+      #if ENABLED(ULTIPANEL)
232
+        #define LCD_PINS_D5   P1_21
233
+        #define LCD_PINS_D6   P1_22
234
+        #define LCD_PINS_D7   P1_23
235
+      #endif
236
+
237
+    #endif // FYSETC_MINI_12864
215 238
 
216 239
   #endif
217 240
 

+ 9
- 19
Marlin/src/pins/pins_FYSETC_F6_13.h View File

@@ -184,11 +184,6 @@
184 184
 #define BEEPER_PIN         37
185 185
 #define SD_DETECT_PIN      49
186 186
 
187
-#if ENABLED(MKS_MINI_12864)
188
-  #define DOGLCD_A0        27
189
-  #define DOGLCD_CS        25
190
-#endif
191
-
192 187
 #if ENABLED(FYSETC_MINI_12864)
193 188
   //
194 189
   // See https://wiki.fysetc.com/Mini12864_Panel/?fbclid=IwAR1FyjuNdVOOy9_xzky3qqo_WeM5h-4gpRnnWhQr_O1Ef3h0AFnFXmCehK8
@@ -205,6 +200,10 @@
205 200
     #define RGB_LED_B_PIN  29
206 201
   #endif
207 202
 
203
+  #define LCD_BACKLIGHT_PIN -1
204
+  #define LCD_RESET_PIN    23
205
+  #define KILL_PIN         41
206
+
208 207
 #elif HAS_GRAPHICAL_LCD
209 208
 
210 209
   #define LCD_PINS_RS      16
@@ -214,6 +213,11 @@
214 213
   #define LCD_PINS_D6      27
215 214
   #define LCD_PINS_D7      29
216 215
 
216
+  #if ENABLED(MKS_MINI_12864)
217
+    #define DOGLCD_CS      25
218
+    #define DOGLCD_A0      27
219
+  #endif
220
+
217 221
 #endif
218 222
 
219 223
 #if ENABLED(NEWPANEL)
@@ -222,20 +226,6 @@
222 226
   #define BTN_ENC          35
223 227
 #endif
224 228
 
225
-#if ENABLED(FYSETC_MINI_12864)
226
-  #define LCD_BACKLIGHT_PIN -1
227
-  #define LCD_RESET_PIN    23
228
-  #define KILL_PIN         41
229
-  #ifndef RGB_LED_R_PIN
230
-    #define RGB_LED_R_PIN  25
231
-  #endif
232
-  #ifndef RGB_LED_G_PIN
233
-    #define RGB_LED_G_PIN  27
234
-  #endif
235
-  #ifndef RGB_LED_B_PIN
236
-    #define RGB_LED_B_PIN  29
237
-  #endif
238
-#endif
239 229
 #ifndef RGB_LED_R_PIN
240 230
   #define RGB_LED_R_PIN     3
241 231
 #endif

Loading…
Cancel
Save