Skip to content

Commit

Permalink
Update Robin Pro TFT Pins (MarlinFirmware#21879)
Browse files Browse the repository at this point in the history
  • Loading branch information
rhapsodyv authored and Night69 committed Aug 31, 2021
1 parent 78ff7fb commit 058ea4f
Showing 1 changed file with 25 additions and 56 deletions.
81 changes: 25 additions & 56 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
//
// Note: MKS Robin board is using SPI2 interface.
//
#define SPI_DEVICE 2
#define SPI_DEVICE 2

//
// Servos
Expand Down Expand Up @@ -175,38 +175,20 @@
/**
* Note: MKS Robin Pro board is using SPI2 interface. Make sure your stm32duino library is configured accordingly
*/
//#define TEMP_0_CS_PIN PE5 // TC1 - CS1
//#define TEMP_0_CS_PIN PF11 // TC2 - CS2
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
//#define MAX6675_SS_PIN PF11 // TC2 - CS2

#define POWER_LOSS_PIN PA2 // PW_DET
#define PS_ON_PIN PG11 // PW_OFF
#define FIL_RUNOUT_PIN PA4 // MT_DET1
#define FIL_RUNOUT2_PIN PE6 // MT_DET2
#define FIL_RUNOUT3_PIN PG14 // MT_DET3

//
// Power Supply Control
//
#if ENABLED(PSU_CONTROL) // MKSPWC
#if HAS_TFT_LVGL_UI
#error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue."
#endif
#ifndef PS_ON_PIN
#define PS_ON_PIN PG11 // SUICIDE
#endif
#ifndef KILL_PIN
#define KILL_PIN PA2
#define KILL_PIN_STATE HIGH
#endif
#else
#define SUICIDE_PIN PG11
#define SUICIDE_PIN_INVERTING false
#endif
//#define FIL_RUNOUT_PIN PE6 // MT_DET2
//#define FIL_RUNOUT_PIN PG14 // MT_DET3

//
// SD Card
//
#ifndef SDCARD_CONNECTION
#define SDCARD_CONNECTION ONBOARD
#define SDCARD_CONNECTION ONBOARD
#endif

#if SD_CONNECTION_IS(LCD)
Expand All @@ -223,38 +205,24 @@
#error "No custom SD drive cable defined for this board."
#endif

//
// TFT with FSMC interface
//
/**
* 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
/**
* 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.
*/
#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
#define FSMC_DMA_CHANNEL DMA_CH5
#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 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_RESET_PIN PF6
#define LCD_BACKLIGHT_PIN PD13

#define TFT_BUFFER_SIZE 14400
#define TFT_RESET_PIN LCD_RESET_PIN
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN

#if NEED_TOUCH_PINS
#define TOUCH_BUTTONS_HW_SPI
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
#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 TOUCH_CS_PIN PA7
#else
#define BEEPER_PIN PC5
#define BTN_ENC PG2
Expand Down Expand Up @@ -287,7 +255,8 @@
#define DOGLCD_SCK PB13
#define DOGLCD_MOSI PB15

#else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
#else
// !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY

#define LCD_PINS_D4 PF14
#if IS_ULTIPANEL
Expand All @@ -296,7 +265,7 @@
#define LCD_PINS_D7 PF13

#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
#endif

#endif
Expand All @@ -315,10 +284,10 @@
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
#endif

#define HAS_SPI_FLASH 1
#define HAS_SPI_FLASH 1
#if HAS_SPI_FLASH
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN PB12 // Flash chip-select
#define SPI_FLASH_SIZE 0x1000000 // 16MB
#define W25QXX_CS_PIN PB12 // Flash chip-select
#define W25QXX_MOSI_PIN PB15
#define W25QXX_MISO_PIN PB14
#define W25QXX_SCK_PIN PB13
Expand Down

0 comments on commit 058ea4f

Please sign in to comment.