Skip to content

Commit f93894a

Browse files
MKS-Seanvgadreau
authored andcommitted
Robin nano V2, TFT LVGL UI parameters, and more (MarlinFirmware#18500)
1 parent 67aecdd commit f93894a

File tree

90 files changed

+11716
-4179
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+11716
-4179
lines changed

Marlin/Configuration.h

+12-9
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@
135135
//#define CUSTOM_MACHINE_NAME "3D Printer"
136136

137137
// Printer's unique ID, used by some programs to differentiate between machines.
138-
// Choose your own or use a service like http://www.uuidgenerator.net/version4
138+
// Choose your own or use a service like https://www.uuidgenerator.net/version4
139139
//#define MACHINE_UUID "00000000-0000-0000-0000-000000000000"
140140

141141
// @section extruder
@@ -2153,20 +2153,23 @@
21532153
//
21542154
// TFT LVGL UI
21552155
//
2156-
// Default MKS icons and fonts: https://git.io/JJvzK
2157-
// Copy mks_pic and mks_font folders to the root of your SD
2156+
// Using default MKS icons and fonts from: https://git.io/JJvzK
2157+
// Just copy the `assets` folder from the build directory to the
2158+
// root of your SD card, together with the compiled firmware.
21582159
//
2159-
//#define TFT_LVGL_UI
2160+
// Robin nano v1.2 uses FSMC
2161+
//
2162+
//#define TFT_LVGL_UI_FSMC
2163+
2164+
// Robin nano v2.0 uses SPI
2165+
//
2166+
//#define TFT_LVGL_UI_SPI
2167+
21602168

21612169
//=============================================================================
21622170
//============================ Other Controllers ============================
21632171
//=============================================================================
21642172

2165-
//
2166-
// Robin nano v2.0 SPI touch screen
2167-
//
2168-
//#define SPI_GRAPHICAL_TFT
2169-
21702173
//
21712174
// Ender-3 v2 OEM display. A DWIN display with Rotary Encoder.
21722175
//

Marlin/Version.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,6 @@
7171
* Set the vendor info the serial USB interface, if changable
7272
* Currently only supported by DUE platform
7373
*/
74-
//#define USB_DEVICE_VENDOR_ID 0x0000
75-
//#define USB_DEVICE_PRODUCT_ID 0x0000
76-
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL
74+
//#define USB_DEVICE_VENDOR_ID 0x0000
75+
//#define USB_DEVICE_PRODUCT_ID 0x0000
76+
//#define USB_DEVICE_MANUFACTURE_NAME WEBSITE_URL

Marlin/src/MarlinCore.cpp

+6-5
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@
5959
#include "gcode/parser.h"
6060
#include "gcode/queue.h"
6161

62-
#if ENABLED(TFT_LVGL_UI)
63-
#include "lvgl.h"
62+
#if HAS_TFT_LVGL_UI
6463
#include "lcd/extui/lib/mks_ui/tft_lvgl_configuration.h"
6564
#include "lcd/extui/lib/mks_ui/draw_ui.h"
65+
#include "lcd/extui/lib/mks_ui/mks_hardware_test.h"
66+
#include <lvgl.h>
6667
#endif
6768

6869
#if ENABLED(DWIN_CREALITY_LCD)
@@ -755,7 +756,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
755756
// Direct Stepping
756757
TERN_(DIRECT_STEPPING, page_manager.write_responses());
757758

758-
#if ENABLED(TFT_LVGL_UI)
759+
#if HAS_TFT_LVGL_UI
759760
LV_TASK_HANDLER();
760761
#endif
761762
}
@@ -1192,7 +1193,7 @@ void setup() {
11921193
SETUP_RUN(page_manager.init());
11931194
#endif
11941195

1195-
#if ENABLED(TFT_LVGL_UI)
1196+
#if HAS_TFT_LVGL_UI
11961197
if (!card.isMounted()) SETUP_RUN(card.mount()); // Mount SD to load graphics and fonts
11971198
SETUP_RUN(tft_lvgl_init());
11981199
#endif
@@ -1229,7 +1230,7 @@ void loop() {
12291230

12301231
endstops.event_handler();
12311232

1232-
TERN_(TFT_LVGL_UI, printer_state_polling());
1233+
TERN_(HAS_TFT_LVGL_UI, printer_state_polling());
12331234

12341235
} while (ENABLED(__AVR__)); // Loop forever on slower (AVR) boards
12351236
}

Marlin/src/core/boards.h

+25-24
Original file line numberDiff line numberDiff line change
@@ -288,30 +288,31 @@
288288
#define BOARD_MKS_ROBIN 4007 // MKS Robin (STM32F103ZET6)
289289
#define BOARD_MKS_ROBIN_MINI 4008 // MKS Robin Mini (STM32F103VET6)
290290
#define BOARD_MKS_ROBIN_NANO 4009 // MKS Robin Nano (STM32F103VET6)
291-
#define BOARD_MKS_ROBIN_LITE 4010 // MKS Robin Lite/Lite2 (STM32F103RCT6)
292-
#define BOARD_MKS_ROBIN_LITE3 4011 // MKS Robin Lite3 (STM32F103RCT6)
293-
#define BOARD_MKS_ROBIN_PRO 4012 // MKS Robin Pro (STM32F103ZET6)
294-
#define BOARD_BTT_SKR_MINI_V1_1 4013 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
295-
#define BOARD_BTT_SKR_MINI_E3_V1_0 4014 // BigTreeTech SKR Mini E3 (STM32F103RC)
296-
#define BOARD_BTT_SKR_MINI_E3_V1_2 4015 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
297-
#define BOARD_BTT_SKR_MINI_E3_V2_0 4016 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC)
298-
#define BOARD_BTT_SKR_E3_DIP 4017 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
299-
#define BOARD_JGAURORA_A5S_A1 4018 // JGAurora A5S A1 (STM32F103ZET6)
300-
#define BOARD_FYSETC_AIO_II 4019 // FYSETC AIO_II
301-
#define BOARD_FYSETC_CHEETAH 4020 // FYSETC Cheetah
302-
#define BOARD_FYSETC_CHEETAH_V12 4021 // FYSETC Cheetah V1.2
303-
#define BOARD_LONGER3D_LK 4022 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
304-
#define BOARD_GTM32_MINI 4023 // STM32F103VET6 controller
305-
#define BOARD_GTM32_MINI_A30 4024 // STM32F103VET6 controller
306-
#define BOARD_GTM32_REV_B 4025 // STM32F103VET6 controller
307-
#define BOARD_MKS_ROBIN_E3D 4026 // MKS Robin E3D (STM32F103RCT6)
308-
#define BOARD_MKS_ROBIN_E3 4027 // MKS Robin E3 (STM32F103RCT6)
309-
#define BOARD_MALYAN_M300 4028 // STM32F070-based delta
310-
#define BOARD_CCROBOT_MEEB_3DP 4029 // ccrobot-online.com MEEB_3DP (STM32F103RC)
311-
#define BOARD_CHITU3D_V5 4030 // Chitu3D TronXY X5SA V5 Board
312-
#define BOARD_CHITU3D_V6 4031 // Chitu3D TronXY X5SA V5 Board
313-
#define BOARD_CREALITY_V4 4032 // Creality v4.x (STM32F103RE)
314-
#define BOARD_TRIGORILLA_PRO 4033 // Trigorilla Pro (STM32F103ZET6)
291+
#define BOARD_MKS_ROBIN_NANO_V2 4010 // MKS Robin Nano V2 (STM32F103VET6)
292+
#define BOARD_MKS_ROBIN_LITE 4011 // MKS Robin Lite/Lite2 (STM32F103RCT6)
293+
#define BOARD_MKS_ROBIN_LITE3 4012 // MKS Robin Lite3 (STM32F103RCT6)
294+
#define BOARD_MKS_ROBIN_PRO 4013 // MKS Robin Pro (STM32F103ZET6)
295+
#define BOARD_BTT_SKR_MINI_V1_1 4014 // BigTreeTech SKR Mini v1.1 (STM32F103RC)
296+
#define BOARD_BTT_SKR_MINI_E3_V1_0 4015 // BigTreeTech SKR Mini E3 (STM32F103RC)
297+
#define BOARD_BTT_SKR_MINI_E3_V1_2 4016 // BigTreeTech SKR Mini E3 V1.2 (STM32F103RC)
298+
#define BOARD_BTT_SKR_MINI_E3_V2_0 4017 // BigTreeTech SKR Mini E3 V2.0 (STM32F103RC)
299+
#define BOARD_BTT_SKR_E3_DIP 4018 // BigTreeTech SKR E3 DIP V1.0 (STM32F103RC / STM32F103RE)
300+
#define BOARD_JGAURORA_A5S_A1 4019 // JGAurora A5S A1 (STM32F103ZET6)
301+
#define BOARD_FYSETC_AIO_II 4020 // FYSETC AIO_II
302+
#define BOARD_FYSETC_CHEETAH 4021 // FYSETC Cheetah
303+
#define BOARD_FYSETC_CHEETAH_V12 4022 // FYSETC Cheetah V1.2
304+
#define BOARD_LONGER3D_LK 4023 // Alfawise U20/U20+/U30 (Longer3D LK1/2) / STM32F103VET6
305+
#define BOARD_GTM32_MINI 4024 // STM32F103VET6 controller
306+
#define BOARD_GTM32_MINI_A30 4025 // STM32F103VET6 controller
307+
#define BOARD_GTM32_REV_B 4026 // STM32F103VET6 controller
308+
#define BOARD_MKS_ROBIN_E3D 4027 // MKS Robin E3D (STM32F103RCT6)
309+
#define BOARD_MKS_ROBIN_E3 4028 // MKS Robin E3 (STM32F103RCT6)
310+
#define BOARD_MALYAN_M300 4029 // STM32F070-based delta
311+
#define BOARD_CCROBOT_MEEB_3DP 4030 // ccrobot-online.com MEEB_3DP (STM32F103RC)
312+
#define BOARD_CHITU3D_V5 4031 // Chitu3D TronXY X5SA V5 Board
313+
#define BOARD_CHITU3D_V6 4032 // Chitu3D TronXY X5SA V5 Board
314+
#define BOARD_CREALITY_V4 4033 // Creality v4.x (STM32F103RE)
315+
#define BOARD_TRIGORILLA_PRO 4034 // Trigorilla Pro (STM32F103ZET6)
315316

316317
//
317318
// ARM Cortex-M4F

Marlin/src/inc/Conditionals_LCD.h

+6-1
Original file line numberDiff line numberDiff line change
@@ -255,12 +255,17 @@
255255
#define IS_ULTIPANEL
256256
#endif
257257

258+
// LVGL UI, SPI or FSMC
259+
#if EITHER(TFT_LVGL_UI_SPI, TFT_LVGL_UI_FSMC)
260+
#define HAS_TFT_LVGL_UI 1
261+
#endif
262+
258263
// FSMC/SPI TFT Panels
259264
#if ENABLED(FSMC_GRAPHICAL_TFT)
260265
#define DOGLCD
261266
#define IS_ULTIPANEL
262267
#define DELAYED_BACKLIGHT_INIT
263-
#elif ENABLED(SPI_GRAPHICAL_TFT)
268+
#elif ENABLED(TFT_LVGL_UI_SPI)
264269
#define DELAYED_BACKLIGHT_INIT
265270
#endif
266271

Marlin/src/inc/SanityCheck.h

+6-2
Original file line numberDiff line numberDiff line change
@@ -449,6 +449,10 @@
449449
#error "POWER_SUPPLY is now obsolete. Please remove it from Configuration.h."
450450
#elif defined(MKS_ROBIN_TFT)
451451
#error "MKS_ROBIN_TFT is now FSMC_GRAPHICAL_TFT. Please update your configuration."
452+
#elif defined(TFT_LVGL_UI)
453+
#error "TFT_LVGL_UI is now TFT_LVGL_UI_FSMC. Please update your configuration."
454+
#elif defined(SPI_GRAPHICAL_TFT)
455+
#error "SPI_GRAPHICAL_TFT is now TFT_LVGL_UI_SPI. Please update your configuration."
452456
#elif defined(SDPOWER)
453457
#error "SDPOWER is now SDPOWER_PIN. Please update your configuration and/or pins."
454458
#elif defined(STRING_SPLASH_LINE1) || defined(STRING_SPLASH_LINE2)
@@ -2217,8 +2221,8 @@ static_assert(hbm[Z_AXIS] >= 0, "HOMING_BUMP_MM.Z must be greater than or equal
22172221
+ ENABLED(MALYAN_LCD) \
22182222
+ ENABLED(TOUCH_UI_FTDI_EVE) \
22192223
+ ENABLED(FSMC_GRAPHICAL_TFT) \
2220-
+ ENABLED(TFT_LVGL_UI) \
2221-
+ ENABLED(SPI_GRAPHICAL_TFT)
2224+
+ ENABLED(TFT_LVGL_UI_FSMC) \
2225+
+ ENABLED(TFT_LVGL_UI_SPI)
22222226
#error "Please select no more than one LCD controller option."
22232227
#endif
22242228

0 commit comments

Comments
 (0)