LVGL and Classic UI for STM32 (#20552)

This commit is contained in:
Victor Oliveira
2020-12-23 23:01:21 -03:00
committed by GitHub
parent f8c6de0cdc
commit 4d6b6bcffc
22 changed files with 113 additions and 133 deletions

View File

@ -139,11 +139,15 @@
#define TFT_RS_PIN PD13
#define TFT_INTERFACE_FSMC_8BIT
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN TFT_CS_PIN
#define FSMC_RS_PIN TFT_RS_PIN
//
// Touch Screen
// https://ldm-systems.ru/f/doc/catalog/HY-TFT-2,8/XPT2046.pdf
//
#if ENABLED(TOUCH_SCREEN)
#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PB2
#define TOUCH_SCK_PIN PB0
#define TOUCH_MOSI_PIN PE5

View File

@ -32,7 +32,7 @@
#define BOARD_INFO_NAME "MKS Robin Nano V3"
// Avoid conflict with TIMER_TONE
#define STEP_TIMER 13
#define STEP_TIMER 10
// Use one of these or SDCard-based Emulation will be used
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
@ -255,7 +255,7 @@
* EXP1 EXP2
*/
#if EITHER(TFT_480x320_SPI, TFT_LVGL_UI_SPI)
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -17253
#endif
@ -345,26 +345,6 @@
#define BOARD_ST7920_DELAY_3 DELAY_NS(600)
#endif // !MKS_MINI_12864
#elif ENABLED(SPI_GRAPHICAL_TFT)
#define SPI_TFT_CS_PIN PD11
#define SPI_TFT_SCK_PIN PA5
#define SPI_TFT_MISO_PIN PA6
#define SPI_TFT_MOSI_PIN PA7
#define SPI_TFT_DC_PIN PD10
#define SPI_TFT_RST_PIN PC6
#define LCD_BACKLIGHT_PIN PD13
#define TOUCH_CS_PIN PE14 // SPI1_NSS
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
#define BTN_EN1 PE8
#define BTN_EN2 PE11
#define BEEPER_PIN PC5
#define BTN_ENC PE13
#endif // HAS_SPI_LCD
#define HAS_OTG_USB_HOST_SUPPORT

View File

@ -30,7 +30,7 @@
#define BOARD_INFO_NAME "MKS Robin PRO V2"
// Avoid conflict with TIMER_TONE
#define STEP_TIMER 13
#define STEP_TIMER 10
// Use one of these or SDCard-based Emulation will be used
//#define SRAM_EEPROM_EMULATION // Use BackSRAM-based EEPROM emulation
@ -243,7 +243,7 @@
//
// LCD / Controller
#define SPI_FLASH
// #define HAS_SPI_FLASH 1
#define HAS_SPI_FLASH 1
#define SPI_DEVICE 2
#define SPI_FLASH_SIZE 0x1000000
#if ENABLED(SPI_FLASH)
@ -264,7 +264,7 @@
* EXP1 EXP2
*/
#if EITHER(TFT_480x320_SPI, TFT_LVGL_UI_SPI)
#if ANY(TFT_COLOR_UI, TFT_LVGL_UI, TFT_CLASSIC_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -17253
#endif
@ -361,24 +361,4 @@
#endif
#endif // !MKS_MINI_12864
#elif ENABLED(SPI_GRAPHICAL_TFT)
#define SPI_TFT_CS_PIN PD11
#define SPI_TFT_SCK_PIN PA5
#define SPI_TFT_MISO_PIN PA6
#define SPI_TFT_MOSI_PIN PA7
#define SPI_TFT_DC_PIN PD10
#define SPI_TFT_RST_PIN PC6
#define LCD_BACKLIGHT_PIN PD13
#define TOUCH_CS_PIN PE14 // SPI1_NSS
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
#define BTN_EN1 PE8
#define BTN_EN2 PE11
#define BEEPER_PIN PC5
#define BTN_ENC PE13
#endif // HAS_SPI_LCD