🎨 LCD pins cleanup - Sept 8

This commit is contained in:
Scott Lahteine 2024-09-08 01:01:53 -05:00
parent 81b13456b1
commit da4a374b49
20 changed files with 93 additions and 112 deletions

View file

@ -149,8 +149,6 @@
#if HAS_MARLINUI_U8GLIB
#define DOGLCD_A0 26
#define DOGLCD_CS 24
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
//#define DOGLCD_SCK -1
#endif
#endif

View file

@ -137,10 +137,9 @@
#define TFT_RESET_PIN PF11
#define TFT_BACKLIGHT_PIN PD13
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#endif

View file

@ -291,20 +291,17 @@
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
* If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
//#define TFT_RESET_PIN PC6 // FSMC_RST
#define TFT_BACKLIGHT_PIN PD13
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View file

@ -112,14 +112,13 @@
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
#define LCD_BACKLIGHT_PIN PF11
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PG0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define LCD_BACKLIGHT_PIN PF11
#endif
//

View file

@ -135,10 +135,9 @@
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7 // FSMC_NE1
#define FSMC_RS_PIN PD11 // A16 Register. Only one address needed
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
@ -146,9 +145,6 @@
#define TFT_BACKLIGHT_PIN PD12
#define TFT_BACKLIGHT_PWM 150 // Brightness with alt. TIM4 chan 1 (1-255)
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
//#define DOGLCD_SCK -1
// Buffer for Color UI
#define TFT_BUFFER_WORDS 3200
#endif

View file

@ -187,9 +187,6 @@
* to let the bootloader init the screen.
*/
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
//#define DOGLCD_SCK -1
//
// TFT with FSMC interface
//
@ -200,16 +197,17 @@
#define TOUCH_MISO_PIN PB4 // SPI2_MISO
#define TOUCH_INT_PIN PB7 // PenIRQ coming from XPT2046
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define LCD_BACKLIGHT_PIN PG10
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7 // FSMC_NE1
#define FSMC_RS_PIN PE2 // A23 Register. Only one address needed
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define FSMC_DMA_DEV DMA1
#define FSMC_DMA_CHANNEL DMA_CH4
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define LCD_BACKLIGHT_PIN PG10
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
// Buffer for Color UI
#define TFT_BUFFER_WORDS 3200

View file

@ -137,16 +137,15 @@
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
#define TFT_RESET_PIN PF15
#define TFT_BACKLIGHT_PIN PF11
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PG0 // A0
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TFT_RESET_PIN PF15
#define TFT_BACKLIGHT_PIN PF11
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1
#endif

View file

@ -171,22 +171,20 @@
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'TFT_RESET_PIN'
* to let the bootloader init the screen.
* If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen.
*
* Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
* Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define TFT_RESET_PIN PF6
#define TFT_BACKLIGHT_PIN PG11
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PG12 // NE4
#define FSMC_RS_PIN PF0 // A0
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TFT_RESET_PIN PF6
#define TFT_BACKLIGHT_PIN PG11
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
#define TFT_BUFFER_WORDS 14400

View file

@ -271,19 +271,25 @@
//
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when switching menus
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#if ENABLED(TFT_CLASSIC_UI)
#if ENABLED(TFT_SCALED_DOGLCD)
// Emulated DOGM SPI
#define LCD_PINS_EN EXP1_03_PIN
#define LCD_PINS_RS EXP1_04_PIN
#define BTN_ENC EXP1_02_PIN
#define BTN_EN1 EXP2_03_PIN
#define BTN_EN2 EXP2_05_PIN
#elif ENABLED(TFT_COLOR_UI)
#elif ENABLED(HAS_GRAPHICAL_TFT)
#define TFT_BUFFER_WORDS 14400
#endif

View file

@ -153,28 +153,24 @@
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
*/
#if HAS_FSMC_TFT
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define TFT_CS_PIN FSMC_CS_PIN // NE4
#define TFT_RS_PIN FSMC_RS_PIN // A0
#define TFT_CS_PIN PD7 // NE4
#define TFT_RS_PIN PD11 // A0
#define LCD_RESET_PIN PC6 // FSMC_RST
#define LCD_BACKLIGHT_PIN PD13
#define FSMC_CS_PIN TFT_CS_PIN // NE4
#define FSMC_RS_PIN TFT_RS_PIN // A0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PC2 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif
#endif
#if ENABLED(TFT_320x240) // TFT32/28

View file

@ -300,8 +300,7 @@
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
*/
#if ENABLED(TFT_CLASSIC_UI)

View file

@ -186,27 +186,22 @@
#if HAS_FSMC_TFT
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'TFT_RESET_PIN'
* to let the bootloader init the screen.
* If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen.
*/
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TFT_RESET_PIN PC6 // FSMC_RST
#define TFT_BACKLIGHT_PIN PD13
//#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals-5-post.h
//#define DOGLCD_SCK -1
#define TOUCH_CS_PIN PA7 // SPI2_NSS
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2

View file

@ -322,22 +322,25 @@
//
#if HAS_FSMC_TFT
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen.
*
* Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define TFT_RESET_PIN LCD_RESET_PIN
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
#define TFT_RESET_PIN FSMC_23_PIN
#define TFT_BACKLIGHT_PIN FSMC_24_PIN
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN FSMC_19_PIN // NE4
#define FSMC_RS_PIN FSMC_20_PIN // A0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define LCD_RESET_PIN FSMC_23_PIN
#define LCD_BACKLIGHT_PIN FSMC_24_PIN
#define TFT_BUFFER_WORDS 14400
#if NEED_TOUCH_PINS

View file

@ -135,26 +135,22 @@
/**
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported.
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
*
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* Setting an 'LCD_RESET_PIN' may cause a flicker when switching menus
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define TFT_RESET_PIN PF11
#define TFT_BACKLIGHT_PIN PD13
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define ANYCUBIC_TFT35
#else
#define LCD_RESET_PIN PF11
#define LCD_BACKLIGHT_PIN PD13

View file

@ -140,7 +140,7 @@
#define TFT_RS_PIN PD13
#if HAS_FSMC_TFT
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN TFT_CS_PIN
#define FSMC_RS_PIN TFT_RS_PIN
#define TFT_INTERFACE_FSMC_8BIT

View file

@ -250,9 +250,9 @@
#define TFT_RESET_PIN PD6
#define TFT_BACKLIGHT_PIN PD3
// TODO: See if FSMC DMA can work
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View file

@ -209,9 +209,9 @@
#define TFT_RESET_PIN PD6
#define TFT_BACKLIGHT_PIN PD3
// TODO: See if FSMC DMA can work
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View file

@ -148,15 +148,15 @@
#endif
#define ST7796S_INVERTED
// TODO: See if FSMC DMA can work
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TFT_RESET_PIN PD6
#define TFT_BACKLIGHT_PIN PD3
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TOUCH_CS_PIN PB6
#define TOUCH_SCK_PIN PB3
#define TOUCH_MOSI_PIN PB5

View file

@ -112,19 +112,22 @@
//
#if HAS_FSMC_TFT
/**
* Note: MKS Robin TFT screens use various TFT controllers.
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported
* Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
*
* If the screen stays white, disable 'TFT_RESET_PIN' to let the bootloader init the screen.
*
* Setting a 'TFT_RESET_PIN' may cause a flicker when switching menus
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define LCD_RESET_PIN PD13
#define LCD_BACKLIGHT_PIN PD12
#define TFT_RESET_PIN LCD_RESET_PIN
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
#define TFT_RESET_PIN PD13
#define TFT_BACKLIGHT_PIN PD12
#define LCD_USE_DMA_FSMC
#define FSMC_CS_PIN PG12 // NE4
#define FSMC_RS_PIN PF12 // A0
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN

View file

@ -172,22 +172,21 @@
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
#define TOUCH_CS_PIN PD11
#define TOUCH_SCK_PIN PB13
#define TOUCH_MISO_PIN PB14
#define TOUCH_MOSI_PIN PB15
#define LCD_USE_DMA_FSMC
//#define FSMC_DMA_DEV DMA2 // Maple
//#define FSMC_DMA_CHANNEL DMA_CH5 // Maple
#define FSMC_CS_PIN PG12
#define FSMC_RS_PIN PG2
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TFT_RESET_PIN PB12
#define TFT_BACKLIGHT_PIN PG8
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define FSMC_CS_PIN PG12
#define FSMC_RS_PIN PG2
#define TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define TOUCH_CS_PIN PD11
#define TOUCH_SCK_PIN PB13
#define TOUCH_MISO_PIN PB14
#define TOUCH_MOSI_PIN PB15
#if ENABLED(TFT_LVGL_UI)
#define HAS_SPI_FLASH_FONT 1