Browse Source

🩹 Fix MKS TinyBee + MKS MINI 12864 SD blank on write (#24670)

Eduard Sukharev 1 year ago
parent
commit
c3b58f1938
No account linked to committer's email address

+ 12
- 0
Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp View File

@@ -32,6 +32,13 @@
32 32
 #include "HAL.h"
33 33
 #include "SPI.h"
34 34
 
35
+#if ENABLED(SDSUPPORT)
36
+  #include "../../sd/cardreader.h"
37
+  #if ENABLED(ESP3D_WIFISUPPORT)
38
+    #include "sd_ESP32.h"
39
+  #endif
40
+#endif
41
+
35 42
 static SPISettings spiConfig;
36 43
 
37 44
 
@@ -45,6 +52,11 @@ static SPISettings spiConfig;
45 52
 
46 53
 uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
47 54
   static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT
55
+
56
+  #if ENABLED(PAUSE_LCD_FOR_BUSY_SD)
57
+    if (card.flag.saving || card.flag.logging || TERN0(ESP3D_WIFISUPPORT, sd_busy_lock == true)) return 0;
58
+  #endif
59
+
48 60
   if (msgInitCount) {
49 61
     if (msg == U8G_COM_MSG_INIT) msgInitCount--;
50 62
     if (msgInitCount) return -1;

+ 5
- 2
Marlin/src/pins/esp32/pins_MKS_TINYBEE.h View File

@@ -166,12 +166,12 @@
166 166
   #define LCD_BACKLIGHT_PIN                   -1
167 167
 
168 168
   #if ENABLED(MKS_MINI_12864)
169
-  // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
169
+    // MKS MINI12864 and MKS LCD12864B; If using MKS LCD12864A (Need to remove RPK2 resistor)
170 170
     #define DOGLCD_CS                EXP1_06_PIN
171 171
     #define DOGLCD_A0                EXP1_07_PIN
172 172
     #define LCD_RESET_PIN                     -1
173 173
   #elif ENABLED(FYSETC_MINI_12864_2_1)
174
-  // MKS_MINI_12864_V3, BTT_MINI_12864_V1, FYSETC_MINI_12864_2_1
174
+    // MKS_MINI_12864_V3, BTT_MINI_12864_V1, FYSETC_MINI_12864_2_1
175 175
     #define DOGLCD_CS                EXP1_03_PIN
176 176
     #define DOGLCD_A0                EXP1_04_PIN
177 177
     #define LCD_RESET_PIN            EXP1_05_PIN
@@ -179,6 +179,9 @@
179 179
     #if SD_CONNECTION_IS(ONBOARD)
180 180
       #define FORCE_SOFT_SPI
181 181
     #endif
182
+    #if BOTH(MKS_MINI_12864_V3, SDSUPPORT)
183
+      #define PAUSE_LCD_FOR_BUSY_SD
184
+    #endif
182 185
   #else
183 186
    #define LCD_PINS_D4               EXP1_05_PIN
184 187
     #if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)

+ 1
- 1
ini/features.ini View File

@@ -238,7 +238,7 @@ HAS_SERVOS                             = src_filter=+<src/module/servo.cpp> +<sr
238 238
 MORGAN_SCARA                           = src_filter=+<src/gcode/scara>
239 239
 HAS_MICROSTEPS                         = src_filter=+<src/gcode/control/M350_M351.cpp>
240 240
 (ESP3D_)?WIFISUPPORT                   = AsyncTCP, ESP Async WebServer
241
-                                         ESP3DLib=https://github.com/luc-github/ESP3DLib/archive/master.zip
241
+                                         ESP3DLib=https://github.com/eduard-sukharev/ESP3DLib/archive/patch-1.zip
242 242
                                          arduinoWebSockets=links2004/WebSockets@2.3.4
243 243
                                          luc-github/ESP32SSDP@1.1.1
244 244
                                          lib_ignore=ESPAsyncTCP

Loading…
Cancel
Save