🎨 Minor cleanup of TFT/FSMC pins

This commit is contained in:
Scott Lahteine 2021-07-14 18:51:58 -05:00
parent 87cc387321
commit 650e1dd1d2
12 changed files with 114 additions and 92 deletions

View File

@ -117,13 +117,9 @@
#define W25QXX_SCK_PIN PB13
//
// TronXY TFT Support
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
// Shared FSMC
#define TOUCH_CS_PIN PB7 // SPI1_NSS
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
#define TOUCH_MISO_PIN PA6 // SPI1_MISO

View File

@ -132,13 +132,9 @@
#define W25QXX_SCK_PIN PB13
//
// TronXY TFT Support
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
// Shared FSMC
#define TOUCH_CS_PIN PB7 // SPI1_NSS
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
@ -152,7 +148,6 @@
#define FSMC_RS_PIN PD11
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#endif
#if ENABLED(TFT_LVGL_UI)

View File

@ -271,11 +271,9 @@
#error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER."
#endif
#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
#define TFT_CS_PIN PD7 // NE4
#define TFT_RS_PIN PD11 // A0
#endif
//
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
/**
* Note: MKS Robin TFT screens use various TFT controllers
@ -291,12 +289,16 @@
*/
//#define TFT_RESET_PIN PC6 // FSMC_RST
#define TFT_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
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TFT_CS_PIN TFT_CS_PIN
#define TFT_RS_PIN TFT_RS_PIN
#ifdef TFT_CLASSIC_UI
#define TFT_MARLINBG_COLOR 0x3186 // Grey
#define TFT_MARLINUI_COLOR 0xC7B6 // Green
@ -307,6 +309,8 @@
#elif HAS_GRAPHICAL_TFT
#define TFT_RESET_PIN PC6
#define TFT_BACKLIGHT_PIN PD13
#define TFT_CS_PIN PD7 // NE4
#define TFT_RS_PIN PD11 // A0
#endif
#if NEED_TOUCH_PINS

View File

@ -26,6 +26,8 @@
*
* o
* Pin assignments for 32-bit JGAurora A5S & A1
*
* https://jgaurorawiki.com/_media/jgaurora_a5s_a1_pinout.png
*/
#include "env_validate.h"
@ -102,15 +104,20 @@
#define FIL_RUNOUT_PIN PC7
//
// LCD
// TFT with FSMC interface
//
#define LCD_BACKLIGHT_PIN PF11
#define FSMC_CS_PIN PD7
#define FSMC_RS_PIN PG0
#if HAS_FSMC_TFT
#define LCD_BACKLIGHT_PIN PF11
#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 FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#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 TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#endif
//
// SD Card
@ -129,4 +136,7 @@
#if NEED_TOUCH_PINS
#define TOUCH_CS_PIN PA4
#define TOUCH_INT_PIN PC4
#define TOUCH_MISO_PIN PA6
#define TOUCH_MOSI_PIN PA7
#define TOUCH_SCK_PIN PA5
#endif

View File

@ -117,20 +117,28 @@
//#undef Z_MAX_PIN // Uncomment if using ZMAX connector (PE5)
#endif
#define TFT_RESET_PIN PC4 // pin 33
#define TFT_BACKLIGHT_PIN PD12 // pin 59
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
//
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#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 TFT_CS_PIN FSMC_CS_PIN
#define TFT_RS_PIN FSMC_RS_PIN
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1
#define TFT_RESET_PIN PC4 // pin 33
#define TFT_BACKLIGHT_PIN PD12 // pin 59
// Buffer for Color UI
#define TFT_BUFFER_SIZE 3200
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1
// Buffer for Color UI
#define TFT_BUFFER_SIZE 3200
#endif
/**
* Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer

View File

@ -133,11 +133,9 @@
//
#define BEEPER_PIN PE4
/**
* 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.
*/
//
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
/**
* Note: MKS Robin TFT screens use various TFT controllers
@ -151,18 +149,17 @@
* Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define TFT_CS_PIN PD7 // NE4
#define TFT_RS_PIN PG0 // A0
#define FSMC_CS_PIN TFT_CS_PIN
#define FSMC_RS_PIN TFT_RS_PIN
#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 FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PG0 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TFT_RESET_PIN PF15
#define TFT_BACKLIGHT_PIN PF11
#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 1

View File

@ -155,7 +155,7 @@
#define WIFI_IO0_PIN PG1
//
// LCD screen
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
/**
@ -170,18 +170,17 @@
* Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#define TFT_CS_PIN PG12 // NE4
#define TFT_RS_PIN PF0 // A0
#define FSMC_CS_PIN TFT_CS_PIN
#define FSMC_RS_PIN TFT_RS_PIN
#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 FSMC_CS_PIN PG12 // NE4
#define FSMC_RS_PIN PF0 // A0
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#define TFT_RESET_PIN PF6
#define TFT_BACKLIGHT_PIN PG11
#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

@ -172,13 +172,18 @@
//
#define BEEPER_PIN PC5
/**
//
// TFT with FSMC interface
//
#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.
*/
// Shared FSMC Configs
#if HAS_FSMC_TFT
#define TFT_RESET_PIN PC6 // FSMC_RST
#define TFT_BACKLIGHT_PIN PD13
#define DOGLCD_MOSI -1 // Prevent auto-define by Conditionals_post.h
#define DOGLCD_SCK -1
@ -187,9 +192,6 @@
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#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 FSMC_CS_PIN PD7
#define FSMC_RS_PIN PD11

View File

@ -205,12 +205,18 @@
#error "No custom SD drive cable defined for this board."
#endif
/**
//
// TFT with FSMC interface
//
#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.
*/
#if HAS_FSMC_TFT
#define TFT_RESET_PIN LCD_RESET_PIN
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#define FSMC_DMA_DEV DMA2
@ -221,8 +227,6 @@
#define LCD_RESET_PIN PF6
#define LCD_BACKLIGHT_PIN PD13
#define TFT_RESET_PIN LCD_RESET_PIN
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
#define TFT_BUFFER_SIZE 14400

View File

@ -126,7 +126,11 @@
//#define POWER_LOSS_PIN PG2 // PG4 PW_DET
#define FIL_RUNOUT_PIN PA15 // MT_DET
/**
//
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
/**
* Note: MKS Robin TFT screens use various TFT controllers
* Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
* ILI9488 is not supported.
@ -137,9 +141,9 @@
* Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
* because Marlin uses the reset as a failsafe to revive a glitchy LCD.
*/
#if HAS_FSMC_TFT
#define TFT_RESET_PIN PF11
#define TFT_BACKLIGHT_PIN PD13
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0

View File

@ -136,14 +136,18 @@
//
// LCD / Controller
//
#define TFT_RESET_PIN PE6
#define TFT_CS_PIN PD7
#define TFT_RS_PIN PD13
#define TFT_INTERFACE_FSMC_8BIT
#if HAS_SPI_TFT || HAS_FSMC_TFT
#define TFT_RESET_PIN PE6
#define TFT_CS_PIN PD7
#define TFT_RS_PIN PD13
#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
#if HAS_FSMC_TFT
#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
#define TFT_INTERFACE_FSMC_8BIT
#endif
#endif
//
// Touch Screen

View File

@ -230,9 +230,8 @@
#define BEEPER_PIN PC7
//
// LCD / Controller
// TFT with FSMC interface
//
#if HAS_FSMC_TFT
//#define TFT_DRIVER LERDGE_ST7796