Browse Source

📺 MKS MINI12864 V3 for Robin E3P, etc. (#22453)

mks-viva 4 years ago
parent
commit
a70d0726ca
No account linked to committer's email address

+ 2
- 2
Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h View File

@@ -41,7 +41,7 @@
41 41
 #define BOARD_NO_NATIVE_USB
42 42
 
43 43
 // Avoid conflict with TIMER_SERVO when using the STM32 HAL
44
-#define TEMP_TIMER 5
44
+#define TEMP_TIMER                             5
45 45
 
46 46
 //
47 47
 // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
@@ -65,7 +65,7 @@
65 65
 #define SD_SCK_PIN                          PB13  // SPI2
66 66
 #define SD_MISO_PIN                         PB14  // SPI2
67 67
 #define SD_MOSI_PIN                         PB15  // SPI2
68
-#define SPI_DEVICE 2
68
+#define SPI_DEVICE                             2
69 69
 
70 70
 // SPI Flash
71 71
 #define HAS_SPI_FLASH                          1

+ 55
- 23
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h View File

@@ -38,6 +38,9 @@
38 38
 #define BOARD_NO_NATIVE_USB
39 39
 #define MKS_HARDWARE_TEST_ONLY_E0
40 40
 
41
+// Avoid conflict with TIMER_SERVO when using the STM32 HAL
42
+#define TEMP_TIMER                             5
43
+
41 44
 //
42 45
 // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
43 46
 //
@@ -214,17 +217,23 @@
214 217
   #define SDCARD_CONNECTION              ONBOARD
215 218
 #endif
216 219
 
217
-#define SDIO_SUPPORT
218
-#define SDIO_CLOCK                       4500000  // 4.5 MHz
219
-#define SD_DETECT_PIN                       PD12
220
-#define ONBOARD_SD_CS_PIN                   PC11
220
+#if SD_CONNECTION_IS(ONBOARD)
221
+  #define SDIO_SUPPORT
222
+  #define SDIO_CLOCK                     4500000  // 4.5 MHz
223
+  #define SD_DETECT_PIN                     PD12
224
+  #define ONBOARD_SD_CS_PIN                 PC11
225
+#elif SD_CONNECTION_IS(LCD)
226
+  #define ENABLE_SPI1
227
+  #define SDSS                              PE10
228
+  #define SD_SCK_PIN                        PA5
229
+  #define SD_MISO_PIN                       PA6
230
+  #define SD_MOSI_PIN                       PA7
231
+  #define SD_DETECT_PIN                     PE12
232
+#endif
221 233
 
222 234
 //
223 235
 // LCD / Controller
224 236
 //
225
-#ifndef BEEPER_PIN
226
-  #define BEEPER_PIN                        PC5
227
-#endif
228 237
 
229 238
 /**
230 239
  * Note: MKS Robin TFT screens use various TFT controllers.
@@ -261,33 +270,29 @@
261 270
   #define TOUCH_BUTTONS_HW_SPI
262 271
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          1
263 272
 
264
-  #ifndef TFT_WIDTH
265
-    #define TFT_WIDTH                        480
266
-  #endif
267
-  #ifndef TFT_HEIGHT
268
-    #define TFT_HEIGHT                       320
269
-  #endif
270
-
271
-  #define LCD_READ_ID                       0xD3
272 273
   #define LCD_USE_DMA_SPI
273 274
 
274 275
 #endif
275 276
 
276
-#if HAS_SPI_GRAPHICAL_TFT
277
+#if ENABLED(TFT_CLASSIC_UI)
277 278
   // Emulated DOGM SPI
278 279
   #define LCD_PINS_ENABLE                   PD13
279 280
   #define LCD_PINS_RS                       PC6
280 281
   #define BTN_ENC                           PE13
281 282
   #define BTN_EN1                           PE8
282 283
   #define BTN_EN2                           PE11
283
-#elif ENABLED(TFT_480x320_SPI)
284
-  #define TFT_DRIVER                      ST7796
284
+#elif ENABLED(TFT_COLOR_UI)
285 285
   #define TFT_BUFFER_SIZE                  14400
286 286
 #endif
287 287
 
288 288
 #if HAS_WIRED_LCD && !HAS_SPI_TFT
289
-
290
-  // NON TFT Displays
289
+  #define BEEPER_PIN                        PC5
290
+  #define BTN_ENC                           PE13
291
+  #define LCD_PINS_ENABLE                   PD13
292
+  #define LCD_PINS_RS                       PC6
293
+  #define BTN_EN1                           PE8
294
+  #define BTN_EN2                           PE11
295
+  #define LCD_BACKLIGHT_PIN                 -1
291 296
 
292 297
   #if ENABLED(MKS_MINI_12864)
293 298
 
@@ -301,9 +306,32 @@
301 306
     #define DOGLCD_SCK                      PA5
302 307
     #define DOGLCD_MOSI                     PA7
303 308
 
304
-    // Required for MKS_MINI_12864 with this board
305
-    #define MKS_LCD12864B
306
-    #undef SHOW_BOOTSCREEN
309
+  #elif IS_TFTGLCD_PANEL
310
+
311
+    #if ENABLED(TFTGLCD_PANEL_SPI)
312
+      #define PIN_SPI_SCK                   PA5
313
+      #define PIN_TFT_MISO                  PA6
314
+      #define PIN_TFT_MOSI                  PA7
315
+      #define TFTGLCD_CS                    PE8
316
+    #endif
317
+
318
+    #ifndef BEEPER_PIN
319
+      #define BEEPER_PIN                    -1
320
+    #endif
321
+
322
+  #elif ENABLED(MKS_MINI_12864_V3)
323
+    #define DOGLCD_CS                       PD13
324
+    #define DOGLCD_A0                       PC6
325
+    #define LCD_PINS_DC                DOGLCD_A0
326
+    #define LCD_BACKLIGHT_PIN               -1
327
+    #define LCD_RESET_PIN                   PE14
328
+    #define NEOPIXEL_PIN                    PE15
329
+    #define DOGLCD_MOSI                     PA7
330
+    #define DOGLCD_SCK                      PA5
331
+    #if SD_CONNECTION_IS(ONBOARD)
332
+      #define FORCE_SOFT_SPI
333
+    #endif
334
+	//#define LCD_SCREEN_ROT_180
307 335
 
308 336
   #else                                           // !MKS_MINI_12864
309 337
 
@@ -342,6 +370,10 @@
342 370
   #define W25QXX_SCK_PIN                    PB13
343 371
 #endif
344 372
 
373
+#ifndef BEEPER_PIN
374
+  #define BEEPER_PIN                        PC5
375
+#endif
376
+
345 377
 #if ENABLED(SPEAKER) && BEEPER_PIN == PC5
346 378
   #error "MKS Robin nano default BEEPER_PIN is not a SPEAKER."
347 379
 #endif

+ 1
- 0
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3_common.h View File

@@ -166,6 +166,7 @@
166 166
     #define DOGLCD_SCK                      PB13
167 167
     #define FORCE_SOFT_SPI
168 168
     #define SOFTWARE_SPI
169
+	//#define LCD_SCREEN_ROT_180
169 170
 
170 171
   #else
171 172
 

+ 1
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h View File

@@ -37,7 +37,7 @@
37 37
 #define BOARD_NO_NATIVE_USB
38 38
 
39 39
 // Avoid conflict with TIMER_SERVO when using the STM32 HAL
40
-#define TEMP_TIMER 5
40
+#define TEMP_TIMER                             5
41 41
 
42 42
 //
43 43
 // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role

+ 2
- 1
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h View File

@@ -38,7 +38,7 @@
38 38
 #define BOARD_NO_NATIVE_USB
39 39
 
40 40
 // Avoid conflict with TIMER_SERVO when using the STM32 HAL
41
-#define TEMP_TIMER 5
41
+#define TEMP_TIMER                             5
42 42
 
43 43
 //
44 44
 // Release PB4 (Y_ENABLE_PIN) from JTAG NRST role
@@ -345,6 +345,7 @@
345 345
     #if SD_CONNECTION_IS(ONBOARD)
346 346
       #define FORCE_SOFT_SPI
347 347
     #endif
348
+	//#define LCD_SCREEN_ROT_180
348 349
 
349 350
   #else                                           // !MKS_MINI_12864
350 351
 

+ 2
- 2
Marlin/src/pins/stm32f4/pins_FLYF407ZG.h View File

@@ -33,8 +33,8 @@
33 33
 #define DEFAULT_MACHINE_NAME BOARD_INFO_NAME
34 34
 
35 35
 // Avoid conflict with fans and TIMER_TONE
36
-#define TEMP_TIMER 3
37
-#define STEP_TIMER 5
36
+#define TEMP_TIMER                             3
37
+#define STEP_TIMER                             5
38 38
 
39 39
 //
40 40
 // EEPROM Emulation

+ 1
- 0
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3.h View File

@@ -365,6 +365,7 @@
365 365
     #if SD_CONNECTION_IS(ONBOARD)
366 366
       #define FORCE_SOFT_SPI
367 367
     #endif
368
+	//#define LCD_SCREEN_ROT_180
368 369
 
369 370
   #else // !MKS_MINI_12864
370 371
 

+ 2
- 2
Marlin/src/pins/stm32f4/pins_RUMBA32_common.h View File

@@ -45,8 +45,8 @@
45 45
 //              This will be difficult to solve from the Arduino IDE, without modifying the RUMBA32 variant
46 46
 //              included with the STM32 framework.
47 47
 
48
-#define STEP_TIMER 10
49
-#define TEMP_TIMER 14
48
+#define STEP_TIMER                            10
49
+#define TEMP_TIMER                            14
50 50
 
51 51
 //
52 52
 // Limit Switches

Loading…
Cancel
Save