🩹 Fix MKS TinyBee + MKS MINI 12864 SD blank on write (#24670)
This commit is contained in:
parent
2f24c31454
commit
bdb7f3af3f
@ -32,6 +32,13 @@
|
|||||||
#include "HAL.h"
|
#include "HAL.h"
|
||||||
#include "SPI.h"
|
#include "SPI.h"
|
||||||
|
|
||||||
|
#if ENABLED(SDSUPPORT)
|
||||||
|
#include "../../sd/cardreader.h"
|
||||||
|
#if ENABLED(ESP3D_WIFISUPPORT)
|
||||||
|
#include "sd_ESP32.h"
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
|
||||||
static SPISettings spiConfig;
|
static SPISettings spiConfig;
|
||||||
|
|
||||||
|
|
||||||
@ -45,6 +52,11 @@ static SPISettings spiConfig;
|
|||||||
|
|
||||||
uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
uint8_t u8g_eps_hw_spi_fn(u8g_t *u8g, uint8_t msg, uint8_t arg_val, void *arg_ptr) {
|
||||||
static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT
|
static uint8_t msgInitCount = 2; // Ignore all messages until 2nd U8G_COM_MSG_INIT
|
||||||
|
|
||||||
|
#if ENABLED(PAUSE_LCD_FOR_BUSY_SD)
|
||||||
|
if (card.flag.saving || card.flag.logging || TERN0(ESP3D_WIFISUPPORT, sd_busy_lock == true)) return 0;
|
||||||
|
#endif
|
||||||
|
|
||||||
if (msgInitCount) {
|
if (msgInitCount) {
|
||||||
if (msg == U8G_COM_MSG_INIT) msgInitCount--;
|
if (msg == U8G_COM_MSG_INIT) msgInitCount--;
|
||||||
if (msgInitCount) return -1;
|
if (msgInitCount) return -1;
|
||||||
|
@ -179,6 +179,9 @@
|
|||||||
#if SD_CONNECTION_IS(ONBOARD)
|
#if SD_CONNECTION_IS(ONBOARD)
|
||||||
#define FORCE_SOFT_SPI
|
#define FORCE_SOFT_SPI
|
||||||
#endif
|
#endif
|
||||||
|
#if BOTH(MKS_MINI_12864_V3, SDSUPPORT)
|
||||||
|
#define PAUSE_LCD_FOR_BUSY_SD
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
#define LCD_PINS_D4 EXP1_05_PIN
|
#define LCD_PINS_D4 EXP1_05_PIN
|
||||||
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user