From 35e11e5f8bf873a399e722d048669e72cc492a29 Mon Sep 17 00:00:00 2001 From: Victor Oliveira Date: Thu, 6 Aug 2020 22:52:01 -0300 Subject: [PATCH] Followup fixes to LVGL for Chitu (#18940) --- Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h | 2 +- Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h | 29 ++++++++++--------- Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h | 29 ++++++++++--------- 3 files changed, 33 insertions(+), 27 deletions(-) diff --git a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h b/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h index d97b54a658..c71bdbd737 100644 --- a/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h +++ b/Marlin/src/lcd/extui/lib/mks_ui/pic_manager.h @@ -25,7 +25,7 @@ extern "C" { /* C-declarations for C++ */ #endif -#include "../../inc/MarlinConfigPre.h" +#include "../../../../inc/MarlinConfig.h" #include diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h index b6863d252b..6a39365887 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h @@ -147,21 +147,24 @@ #endif #endif -#define SPI_FLASH_SIZE 0x200000 // 2MB +// SPI Flash +#define SPI_FLASH_SIZE 0x200000 // 2MB +#define HAS_SPI_FLASH 1 + +// SPI 2 +#define W25QXX_CS_PIN PB12 +#define W25QXX_MOSI_PIN PB15 +#define W25QXX_MISO_PIN PB14 +#define W25QXX_SCK_PIN PB13 #if HAS_TFT_LVGL_UI - #define HAS_SPI_FLASH_FONT 1 - #define HAS_GCODE_PREVIEW 1 - #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 - #define HAS_LANG_SELECT_SCREEN 1 - #define HAS_BAK_VIEW_IN_FLASH 0 - #define HAS_LOGO_IN_FLASH 0 - - // SPI 2 - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define HAS_SPI_FLASH_FONT 1 + #define HAS_GCODE_PREVIEW 1 + #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 + #define HAS_LANG_SELECT_SCREEN 1 + #define HAS_BAK_VIEW_IN_FLASH 0 + #define HAS_LOGO_IN_FLASH 0 + #define HAS_TOUCH_XPT2046 1 #define TOUCH_CS_PIN PB7 // SPI1_NSS #define TOUCH_SCK_PIN PA5 // SPI1_SCK diff --git a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h index 7a3777da46..be64512b50 100644 --- a/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h +++ b/Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h @@ -158,21 +158,24 @@ #endif #endif -#define SPI_FLASH_SIZE 0x200000 // 2MB +// SPI Flash +#define SPI_FLASH_SIZE 0x200000 // 2MB +#define HAS_SPI_FLASH 1 + +// SPI 2 +#define W25QXX_CS_PIN PB12 +#define W25QXX_MOSI_PIN PB15 +#define W25QXX_MISO_PIN PB14 +#define W25QXX_SCK_PIN PB13 #if HAS_TFT_LVGL_UI - #define HAS_SPI_FLASH_FONT 0 - #define HAS_GCODE_PREVIEW 1 - #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 - #define HAS_LANG_SELECT_SCREEN 0 - #define HAS_BAK_VIEW_IN_FLASH 0 - #define HAS_LOGO_IN_FLASH 0 - - // SPI 2 - #define W25QXX_CS_PIN PB12 - #define W25QXX_MOSI_PIN PB15 - #define W25QXX_MISO_PIN PB14 - #define W25QXX_SCK_PIN PB13 + #define HAS_SPI_FLASH_FONT 0 + #define HAS_GCODE_PREVIEW 1 + #define HAS_GCODE_DEFAULT_VIEW_IN_FLASH 0 + #define HAS_LANG_SELECT_SCREEN 0 + #define HAS_BAK_VIEW_IN_FLASH 0 + #define HAS_LOGO_IN_FLASH 0 + #define HAS_TOUCH_XPT2046 1 #define TOUCH_CS_PIN PB7 // SPI1_NSS #define TOUCH_SCK_PIN PA5 // SPI1_SCK