Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TFT SPI Pins for BTT SKR v1.3 #21794

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
69 changes: 68 additions & 1 deletion Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
Original file line number Diff line number Diff line change
Expand Up @@ -267,8 +267,75 @@

#error "ADC BUTTONS do not work unmodifed on SKR 1.3, The ADC ports cannot take more than 3.3v."

#elif IS_TFTGLCD_PANEL
#elif HAS_SPI_TFT // Config for Classic UI (emulated DOGM) and Color UI

#define TFT_A0_PIN EXP1_03_PIN
#define TFT_DC_PIN EXP1_03_PIN
#define TFT_CS_PIN EXP1_04_PIN
#define TFT_RESET_PIN EXP1_07_PIN
#define TFT_BACKLIGHT_PIN EXP1_08_PIN

#define TFT_RST_PIN EXP2_04_PIN
#define TFT_MOSI_PIN EXP2_05_PIN
#define TFT_SCK_PIN EXP2_09_PIN
#define TFT_MISO_PIN EXP2_10_PIN

#define TOUCH_INT_PIN EXP1_05_PIN
#define TOUCH_CS_PIN EXP1_06_PIN

#define TOUCH_MOSI_PIN EXP2_05_PIN
#define TOUCH_SCK_PIN EXP2_09_PIN
#define TOUCH_MISO_PIN EXP2_10_PIN

#define BTN_EN2 EXP2_06_PIN
#define BTN_EN1 EXP2_08_PIN
#define BTN_ENC EXP1_09_PIN

#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 1

#define TFT_BUFFER_SIZE 2400

#ifndef TFT_WIDTH
#define TFT_WIDTH 480
#endif
#ifndef TFT_HEIGHT
#define TFT_HEIGHT 320
#endif

#define LCD_READ_ID 0xD3
#define LCD_USE_DMA_SPI

#if ENABLED(TFT_CLASSIC_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -11386
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 8684
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 689
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -273
#endif
#elif ENABLED(TFT_COLOR_UI)
#ifndef TOUCH_CALIBRATION_X
#define TOUCH_CALIBRATION_X -16741
#endif
#ifndef TOUCH_CALIBRATION_Y
#define TOUCH_CALIBRATION_Y 11258
#endif
#ifndef TOUCH_OFFSET_X
#define TOUCH_OFFSET_X 1024
#endif
#ifndef TOUCH_OFFSET_Y
#define TOUCH_OFFSET_Y -367
#endif
#define TFT_BUFFER_SIZE 2400
#endif

#elif IS_TFTGLCD_PANEL
#if ENABLED(TFTGLCD_PANEL_SPI)
#define TFTGLCD_CS EXP2_08_PIN
#endif
Expand Down
4 changes: 0 additions & 4 deletions Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h
Original file line number Diff line number Diff line change
Expand Up @@ -402,10 +402,6 @@
#define SD_MISO_PIN EXP2_10_PIN
#define SD_MOSI_PIN EXP2_05_PIN

// Disable any LCD related PINs config
#define LCD_PINS_ENABLE -1
#define LCD_PINS_RS -1

#define TFT_BUFFER_SIZE 2400

#elif IS_TFTGLCD_PANEL
Expand Down