Browse Source

🧑‍💻 Move PB0 init for MKS_ROBIN_NANO

Scott Lahteine 3 years ago
parent
commit
84ed749954

+ 0
- 4
Marlin/src/lcd/extui/mks_ui/tft_lvgl_configuration.cpp View File

@@ -127,10 +127,6 @@ void tft_lvgl_init() {
127 127
 
128 128
   watchdog_refresh();     // LVGL init takes time
129 129
 
130
-  #if MB(MKS_ROBIN_NANO)
131
-    OUT_WRITE(PB0, LOW);  // HE1
132
-  #endif
133
-
134 130
   // Init TFT first!
135 131
   SPI_TFT.spi_init(SPI_FULL_SPEED);
136 132
   SPI_TFT.LCD_init();

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

@@ -45,3 +45,7 @@
45 45
 //#define LED_PIN                           PB2
46 46
 
47 47
 #include "pins_MKS_ROBIN_NANO_common.h"
48
+
49
+#if HAS_TFT_LVGL_UI && FAN1_PIN != PB0 && HEATER_1_PIN != PB0
50
+  #define BOARD_INIT OUT_WRITE(PB0, LOW)
51
+#endif

+ 8
- 9
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_common.h View File

@@ -98,15 +98,6 @@
98 98
 #ifndef HEATER_0_PIN
99 99
   #define HEATER_0_PIN                      PC3
100 100
 #endif
101
-#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
102
-  #ifndef FAN1_PIN
103
-    #define FAN1_PIN                        PB0
104
-  #endif
105
-#else
106
-  #ifndef HEATER_1_PIN
107
-    #define HEATER_1_PIN                    PB0
108
-  #endif
109
-#endif
110 101
 #ifndef FAN_PIN
111 102
   #define FAN_PIN                           PB1   // FAN
112 103
 #endif
@@ -114,6 +105,14 @@
114 105
   #define HEATER_BED_PIN                    PA0
115 106
 #endif
116 107
 
108
+#if HOTENDS == 1 && DISABLED(HEATERS_PARALLEL)
109
+  #ifndef FAN1_PIN
110
+    #define FAN1_PIN                        PB0
111
+  #endif
112
+#elif !defined(HEATER_1_PIN)
113
+  #define HEATER_1_PIN                      PB0
114
+#endif
115
+
117 116
 //
118 117
 // Power Supply Control
119 118
 //

Loading…
Cancel
Save