Skip to content

Commit 058ea4f

Browse files
rhapsodyvNight69
authored andcommitted
Update Robin Pro TFT Pins (MarlinFirmware#21879)
1 parent 78ff7fb commit 058ea4f

File tree

1 file changed

+25
-56
lines changed

1 file changed

+25
-56
lines changed

Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h

Lines changed: 25 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
//
4444
// Note: MKS Robin board is using SPI2 interface.
4545
//
46-
#define SPI_DEVICE 2
46+
#define SPI_DEVICE 2
4747

4848
//
4949
// Servos
@@ -175,38 +175,20 @@
175175
/**
176176
* Note: MKS Robin Pro board is using SPI2 interface. Make sure your stm32duino library is configured accordingly
177177
*/
178-
//#define TEMP_0_CS_PIN PE5 // TC1 - CS1
179-
//#define TEMP_0_CS_PIN PF11 // TC2 - CS2
178+
//#define MAX6675_SS_PIN PE5 // TC1 - CS1
179+
//#define MAX6675_SS_PIN PF11 // TC2 - CS2
180180

181181
#define POWER_LOSS_PIN PA2 // PW_DET
182+
#define PS_ON_PIN PG11 // PW_OFF
182183
#define FIL_RUNOUT_PIN PA4 // MT_DET1
183-
#define FIL_RUNOUT2_PIN PE6 // MT_DET2
184-
#define FIL_RUNOUT3_PIN PG14 // MT_DET3
185-
186-
//
187-
// Power Supply Control
188-
//
189-
#if ENABLED(PSU_CONTROL) // MKSPWC
190-
#if HAS_TFT_LVGL_UI
191-
#error "PSU_CONTROL cannot be used with TFT_LVGL_UI. Disable PSU_CONTROL to continue."
192-
#endif
193-
#ifndef PS_ON_PIN
194-
#define PS_ON_PIN PG11 // SUICIDE
195-
#endif
196-
#ifndef KILL_PIN
197-
#define KILL_PIN PA2
198-
#define KILL_PIN_STATE HIGH
199-
#endif
200-
#else
201-
#define SUICIDE_PIN PG11
202-
#define SUICIDE_PIN_INVERTING false
203-
#endif
184+
//#define FIL_RUNOUT_PIN PE6 // MT_DET2
185+
//#define FIL_RUNOUT_PIN PG14 // MT_DET3
204186

205187
//
206188
// SD Card
207189
//
208190
#ifndef SDCARD_CONNECTION
209-
#define SDCARD_CONNECTION ONBOARD
191+
#define SDCARD_CONNECTION ONBOARD
210192
#endif
211193

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

226-
//
227-
// TFT with FSMC interface
228-
//
208+
/**
209+
* Note: MKS Robin TFT screens use various TFT controllers.
210+
* If the screen stays white, disable 'LCD_RESET_PIN'
211+
* to let the bootloader init the screen.
212+
*/
229213
#if HAS_FSMC_TFT
230-
/**
231-
* Note: MKS Robin TFT screens use various TFT controllers.
232-
* If the screen stays white, disable 'LCD_RESET_PIN'
233-
* to let the bootloader init the screen.
234-
*/
235-
#define TFT_RESET_PIN LCD_RESET_PIN
236-
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
237-
238-
#define FSMC_CS_PIN PD7 // NE4
239-
#define FSMC_RS_PIN PD11 // A0
240-
#define FSMC_DMA_DEV DMA2
241-
#define FSMC_DMA_CHANNEL DMA_CH5
242-
#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
243-
#define TFT_CS_PIN FSMC_CS_PIN
244-
#define TFT_RS_PIN FSMC_RS_PIN
214+
#define FSMC_CS_PIN PD7 // NE4
215+
#define FSMC_RS_PIN PD11 // A0
216+
#define TFT_CS_PIN FSMC_CS_PIN
217+
#define TFT_RS_PIN FSMC_RS_PIN
245218

246219
#define LCD_RESET_PIN PF6
247220
#define LCD_BACKLIGHT_PIN PD13
248-
249-
#define TFT_BUFFER_SIZE 14400
221+
#define TFT_RESET_PIN LCD_RESET_PIN
222+
#define TFT_BACKLIGHT_PIN LCD_BACKLIGHT_PIN
250223

251224
#if NEED_TOUCH_PINS
252-
#define TOUCH_BUTTONS_HW_SPI
253-
#define TOUCH_BUTTONS_HW_SPI_DEVICE 2
254-
#define TOUCH_CS_PIN PA7 // SPI2_NSS
255-
#define TOUCH_SCK_PIN PB13 // SPI2_SCK
256-
#define TOUCH_MISO_PIN PB14 // SPI2_MISO
257-
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
225+
#define TOUCH_CS_PIN PA7
258226
#else
259227
#define BEEPER_PIN PC5
260228
#define BTN_ENC PG2
@@ -287,7 +255,8 @@
287255
#define DOGLCD_SCK PB13
288256
#define DOGLCD_MOSI PB15
289257

290-
#else // !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
258+
#else
259+
// !MKS_MINI_12864 && !ENDER2_STOCKDISPLAY
291260

292261
#define LCD_PINS_D4 PF14
293262
#if IS_ULTIPANEL
@@ -296,7 +265,7 @@
296265
#define LCD_PINS_D7 PF13
297266

298267
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
299-
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
268+
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
300269
#endif
301270

302271
#endif
@@ -315,10 +284,10 @@
315284
#define BOARD_ST7920_DELAY_3 DELAY_NS(125)
316285
#endif
317286

318-
#define HAS_SPI_FLASH 1
287+
#define HAS_SPI_FLASH 1
319288
#if HAS_SPI_FLASH
320-
#define SPI_FLASH_SIZE 0x1000000 // 16MB
321-
#define W25QXX_CS_PIN PB12 // Flash chip-select
289+
#define SPI_FLASH_SIZE 0x1000000 // 16MB
290+
#define W25QXX_CS_PIN PB12 // Flash chip-select
322291
#define W25QXX_MOSI_PIN PB15
323292
#define W25QXX_MISO_PIN PB14
324293
#define W25QXX_SCK_PIN PB13

0 commit comments

Comments
 (0)