Skip to content

Commit

Permalink
Fix MKS MINI 12864 display blank out on MKS TinyBee
Browse files Browse the repository at this point in the history
Fix for the MKS MINI 12864 v3 LCD screen being set blank black and showing nothing in some cases (e.g. accessing SD contents from ESP3D web interface)
  • Loading branch information
eduard-sukharev authored and Eduard Sukharev committed Aug 23, 2022
1 parent e201f4e commit cef9520
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Marlin/src/HAL/ESP32/u8g_esp32_spi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@
#include "HAL.h"
#include "SPI.h"

#if ENABLED(SDSUPPORT)
#include "../../sd/cardreader.h"
#endif //SDSUPPORT

static SPISettings spiConfig;


Expand All @@ -45,6 +49,16 @@ static SPISettings spiConfig;

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


#if ENABLED(MKS_MINI_12864_V3) && (MOTHERBOARD == BOARD_MKS_TINYBEE)
#if ENABLED(SDSUPPORT)
if (card.flag.saving || card.flag.logging) {
return 0;
}
#endif //SDSUPPORT
#endif //ENABLED(MKS_MINI_12864_V3) && (MOTHERBOARD == BOARD_MKS_TINYBEE)

if (msgInitCount) {
if (msg == U8G_COM_MSG_INIT) msgInitCount--;
if (msgInitCount) return -1;
Expand Down

0 comments on commit cef9520

Please sign in to comment.