TFT Presets, Generic options, Sanity checks (#19723)

This commit is contained in:
Scott Lahteine
2020-10-15 03:00:27 -05:00
committed by GitHub
parent 04c27573d6
commit f6ffbe548c
116 changed files with 593 additions and 599 deletions

View File

@@ -175,7 +175,7 @@
#else // !FYSETC_MINI_12864
#define LCD_PINS_D4 PC13
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 PB7
#define LCD_PINS_D6 PC15
#define LCD_PINS_D7 PC14

View File

@@ -126,7 +126,7 @@
#define LCD_PINS_RS PD1 // 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE PD3 // 51 // SID (MOSI)
#define LCD_PINS_D4 PD4 // 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#elif BOTH(IS_NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
@@ -140,7 +140,7 @@
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#if !IS_NEWPANEL
#define BEEPER_PIN PC1 // 33
// Buttons attached to a shift register
// Not wired yet
@@ -151,9 +151,9 @@
#endif
#endif
#if ENABLED(NEWPANEL)
#if IS_NEWPANEL
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
#define BEEPER_PIN PC5
@@ -254,7 +254,7 @@
#define BEEPER_PIN PC1 // 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#if IS_RRW_KEYPAD
#define BTN_EN1 PE0 // 64
#define BTN_EN2 PD11 // 59
#define BTN_ENC PD15 // 63
@@ -279,6 +279,6 @@
#endif
#endif
#endif // NEWPANEL
#endif // IS_NEWPANEL
#endif // HAS_WIRED_LCD

View File

@@ -152,9 +152,6 @@
// Color UI
#define TFT_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#elif ENABLED(TFT_CLASSIC_UI)
// Emulated DOGM
#define GRAPHICAL_TFT_UPSCALE 3
#endif
// XPT2046 Touch Screen calibration

View File

@@ -167,9 +167,6 @@
// Color UI
#define TFT_DRIVER ILI9488
#define TFT_BUFFER_SIZE 14400
#elif ENABLED(TFT_CLASSIC_UI)
// Emulated DOGM
#define GRAPHICAL_TFT_UPSCALE 3
#endif
// XPT2046 Touch Screen calibration

View File

@@ -162,7 +162,7 @@
// not connected to a pin
#define SD_DETECT_PIN PC3
#if ENABLED(NEWPANEL)
#if IS_NEWPANEL
// The encoder and click button
#define BTN_EN1 PC10
#define BTN_EN2 PC11

View File

@@ -153,7 +153,7 @@
//#define LCD_CONTRAST_INIT 190
#if ENABLED(NEWPANEL)
#if IS_NEWPANEL
#define BTN_EN1 PC10
#define BTN_EN2 PC11
#define BTN_ENC PC12

View File

@@ -137,7 +137,7 @@
//
#if HAS_WIRED_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
//
// LCD display on J2 FFC40
// Geeetech's LCD2004A Control Panel is very much like
@@ -172,7 +172,7 @@
#endif // HAS_WIRED_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
//
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector

View File

@@ -137,7 +137,7 @@
//
#if HAS_WIRED_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
//
// LCD display on J2 FFC40
// Geeetech's LCD2004A Control Panel is very much like

View File

@@ -137,7 +137,7 @@
//
#if HAS_WIRED_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
//
// LCD display on J2 FFC40
// Geeetech's LCD2004A Control Panel is very much like
@@ -172,7 +172,7 @@
#endif // HAS_WIRED_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
//
// Geeetech's LCD2004A Control Panel is very much like
// RepRapDiscount Smart Controller, but adds an FFC40 connector

View File

@@ -137,7 +137,7 @@
//
#if HAS_WIRED_LCD
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
//
// LCD display on J2 FFC40

View File

@@ -126,6 +126,11 @@
#endif
#define LED_PIN PB2
#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
#define TFT_CS_PIN PG12 // NE4
#define TFT_RS_PIN PF0 // A0
#endif
#if HAS_FSMC_TFT
/**
* Note: MKS Robin TFT screens use various TFT controllers
@@ -141,10 +146,8 @@
*/
//#define LCD_RESET_PIN PF6
#define LCD_BACKLIGHT_PIN PG11
#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 FSMC_CS_PIN TFT_CS_PIN
#define FSMC_RS_PIN TFT_RS_PIN
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2
@@ -152,8 +155,6 @@
#elif HAS_GRAPHICAL_TFT
#define TFT_RESET_PIN PF6
#define TFT_BACKLIGHT_PIN PG11
#define TFT_CS_PIN PG12 // NE4
#define TFT_RS_PIN PF0 // A0
#endif
#if NEED_TOUCH_PINS

View File

@@ -269,22 +269,13 @@
#endif
#if ENABLED(SPI_GRAPHICAL_TFT)
#if HAS_SPI_GRAPHICAL_TFT
// Emulated DOGM SPI
#ifndef GRAPHICAL_TFT_UPSCALE
#define GRAPHICAL_TFT_UPSCALE 3
#endif
#ifndef TFT_PIXEL_OFFSET_Y
#define TFT_PIXEL_OFFSET_Y 32
#endif
#define LCD_PINS_ENABLE PD13
#define LCD_PINS_RS PC6
#define BTN_ENC PE13
#define BTN_EN1 PE8
#define BTN_EN2 PE11
#define LCD_PINS_ENABLE PD13
#define LCD_PINS_RS PC6
#elif ENABLED(TFT_480x320_SPI)
#define TFT_DRIVER ST7796
#define TFT_BUFFER_SIZE 14400
@@ -304,7 +295,7 @@
#ifndef XPT2046_Y_OFFSET
#define XPT2046_Y_OFFSET -24
#endif
#elif ENABLED(SPI_GRAPHICAL_TFT)
#elif HAS_SPI_GRAPHICAL_TFT
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION -11386
#endif
@@ -342,7 +333,7 @@
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PE14
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 PE15
#define LCD_PINS_D6 PD11
#define LCD_PINS_D7 PD10

View File

@@ -154,7 +154,7 @@
#else
#define LCD_PINS_D4 PA6
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 PA7
#define LCD_PINS_D6 PC4
#define LCD_PINS_D7 PC5

View File

@@ -103,7 +103,7 @@
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PC1
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 -1
#define LCD_PINS_D6 -1
#define LCD_PINS_D7 -1

View File

@@ -124,7 +124,7 @@
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PA6
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 PA7
#define LCD_PINS_D6 PC4
#define LCD_PINS_D7 PC5

View File

@@ -139,6 +139,35 @@
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if EITHER(HAS_FSMC_GRAPHICAL_TFT, TFT_320x240)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#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_RESET_PIN PC6 // FSMC_RST
#define LCD_BACKLIGHT_PIN PD13
#endif
#if BOTH(NEED_TOUCH_PINS, HAS_FSMC_GRAPHICAL_TFT) || ENABLED(TFT_320x240)
#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
#if ENABLED(TFT_320x240) // TFT32/28
#define TFT_DRIVER ILI9341
#define TFT_BUFFER_SIZE 14400
#define ILI9341_COLOR_RGB
// YV for normal screen mounting
#define ILI9341_ORIENTATION ILI9341_MADCTL_MY | ILI9341_MADCTL_MV
// XV for 180° rotated screen mounting
//#define ILI9341_ORIENTATION ILI9341_MADCTL_MX | ILI9341_MADCTL_MV
#endif
#if ENABLED(TOUCH_SCREEN)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION 12033
@@ -154,52 +183,6 @@
#endif
#endif
#if ENABLED(FSMC_GRAPHICAL_TFT)
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
#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_RESET_PIN PC6 // FSMC_RST
#define LCD_BACKLIGHT_PIN PD13
#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
#elif ENABLED(TFT_320x240) //TFT32/28
#define TFT_RESET_PIN PC6
#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
#define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5
#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
#define TFT_DRIVER ILI9341
#define TFT_BUFFER_SIZE 14400
// YV for normal screen mounting
#define ILI9341_ORIENTATION ILI9341_MADCTL_MY | ILI9341_MADCTL_MV
// XV for 180° rotated screen mounting
//#define ILI9341_ORIENTATION ILI9341_MADCTL_MX | ILI9341_MADCTL_MV
#define ILI9341_COLOR_RGB
#endif
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x1000000 // 16MB

View File

@@ -198,7 +198,7 @@
#endif
// XPT2046 Touch Screen calibration
#if EITHER(TFT_LVGL_UI_FSMC, TFT_480x320)
#if EITHER(HAS_TFT_LVGL_UI_FSMC, TFT_480x320)
#ifndef XPT2046_X_CALIBRATION
#define XPT2046_X_CALIBRATION 17880
#endif

View File

@@ -275,20 +275,11 @@
#if ENABLED(TFT_CLASSIC_UI)
// Emulated DOGM SPI
#ifndef GRAPHICAL_TFT_UPSCALE
#define GRAPHICAL_TFT_UPSCALE 3
#endif
#ifndef TFT_PIXEL_OFFSET_Y
#define TFT_PIXEL_OFFSET_Y 32
#endif
#define LCD_PINS_ENABLE PD13
#define LCD_PINS_RS PC6
#define BTN_ENC PE13
#define BTN_EN1 PE8
#define BTN_EN2 PE11
#define LCD_PINS_ENABLE PD13
#define LCD_PINS_RS PC6
#elif ENABLED(TFT_COLOR_UI)
#define TFT_BUFFER_SIZE 14400
#endif
@@ -354,7 +345,7 @@
#else // !MKS_MINI_12864
#define LCD_PINS_D4 PE14
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 PE15
#define LCD_PINS_D6 PD11
#define LCD_PINS_D7 PD10

View File

@@ -210,7 +210,7 @@
* If the screen stays white, disable 'LCD_RESET_PIN'
* to let the bootloader init the screen.
*/
#if ENABLED(FSMC_GRAPHICAL_TFT)
#if HAS_FSMC_GRAPHICAL_TFT
#define FSMC_CS_PIN PD7 // NE4
#define FSMC_RS_PIN PD11 // A0
@@ -254,7 +254,7 @@
#else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
#define LCD_PINS_D4 PF14
#if ENABLED(ULTIPANEL)
#if IS_ULTIPANEL
#define LCD_PINS_D5 PF15
#define LCD_PINS_D6 PF12
#define LCD_PINS_D7 PF13

View File

@@ -103,7 +103,7 @@
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#elif BOTH(IS_NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
@@ -117,7 +117,7 @@
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#if !IS_NEWPANEL
#define BEEPER_PIN 33
// Buttons attached to a shift register
// Not wired yet
@@ -128,9 +128,9 @@
#endif
#endif
#if ENABLED(NEWPANEL)
#if IS_NEWPANEL
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
#define BEEPER_PIN 37
@@ -231,7 +231,7 @@
#define BEEPER_PIN 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#if IS_RRW_KEYPAD
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
@@ -256,6 +256,6 @@
#endif
#endif
#endif // NEWPANEL
#endif // IS_NEWPANEL
#endif // HAS_WIRED_LCD

View File

@@ -118,7 +118,7 @@
#define LCD_PINS_RS 49 // CS chip select /SS chip slave select
#define LCD_PINS_ENABLE 51 // SID (MOSI)
#define LCD_PINS_D4 52 // SCK (CLK) clock
#elif BOTH(NEWPANEL, PANEL_ONE)
#elif BOTH(IS_NEWPANEL, PANEL_ONE)
#define LCD_PINS_RS PB8
#define LCD_PINS_ENABLE PD2
#define LCD_PINS_D4 PB12
@@ -132,7 +132,7 @@
#define LCD_PINS_D5 PB13
#define LCD_PINS_D6 PB14
#define LCD_PINS_D7 PB15
#if DISABLED(NEWPANEL)
#if !IS_NEWPANEL
#define BEEPER_PIN 33
// Buttons attached to a shift register
// Not wired yet
@@ -151,9 +151,9 @@
#define TOUCH_MISO_PIN PB15
#define TOUCH_INT_PIN PC6 // (PenIRQ coming from ADS7843)
#elif ENABLED(NEWPANEL)
#elif IS_NEWPANEL
#if ENABLED(REPRAP_DISCOUNT_SMART_CONTROLLER)
#if IS_RRD_SC
#define BEEPER_PIN 37
@@ -255,7 +255,7 @@
#define BEEPER_PIN 33
// Buttons directly attached to AUX-2
#if ENABLED(REPRAPWORLD_KEYPAD)
#if IS_RRW_KEYPAD
#define BTN_EN1 64
#define BTN_EN2 59
#define BTN_ENC 63
@@ -280,6 +280,6 @@
#endif
#endif
#endif // NEWPANEL
#endif // IS_NEWPANEL
#endif // HAS_WIRED_LCD