Skip to content

Commit

Permalink
new marlin ui support for chitu v5/v6 and mks robin nano v1
Browse files Browse the repository at this point in the history
  • Loading branch information
rhapsodyv committed Aug 8, 2020
1 parent 71295a5 commit 55f83dd
Show file tree
Hide file tree
Showing 3 changed files with 61 additions and 0 deletions.
20 changes: 20 additions & 0 deletions Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,26 @@
#define XPT2046_Y_MAX 1900
#define XPT2046_AVG 4
#define XPT2046_INV 0

#elif ENABLED(TFT_480x320)
#define TFT_RESET_PIN PF11
#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 XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9

#define TOUCH_CS_PIN PB7 // SPI1_NSS
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI
#endif

// SPI1(PA7)=LCD & SPI3(PB5)=STUFF, are not available
Expand Down
21 changes: 21 additions & 0 deletions Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,27 @@
#define XPT2046_Y_OFFSET -20
#endif
#endif

#elif ENABLED(TFT_480x320)
#define TFT_RESET_PIN PF11
#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 XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9

#define TOUCH_CS_PIN PB7 // SPI1_NSS
#define TOUCH_SCK_PIN PA5 // SPI1_SCK
#define TOUCH_MISO_PIN PA6 // SPI1_MISO
#define TOUCH_MOSI_PIN PA7 // SPI1_MOSI

#endif

// SPI Flash
Expand Down
20 changes: 20 additions & 0 deletions Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,26 @@
#define TOUCH_MOSI_PIN PB15 // SPI2_MOSI
#endif

#elif ENABLED(TFT_480x320)
#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 XPT2046_X_CALIBRATION -17181
#define XPT2046_Y_CALIBRATION 11434
#define XPT2046_X_OFFSET 501
#define XPT2046_Y_OFFSET -9

#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

#endif

#define SPI_FLASH
Expand Down

0 comments on commit 55f83dd

Please sign in to comment.