Ver código fonte

MKS Robin: restore the TFT v2.0 support (ST7789V) (#15675)

Tanguy Pruvot 4 anos atrás
pai
commit
c58cc113dd
2 arquivos alterados com 10 adições e 6 exclusões
  1. 7
    3
      Marlin/src/pins/stm32/pins_MKS_ROBIN.h
  2. 3
    3
      platformio.ini

+ 7
- 3
Marlin/src/pins/stm32/pins_MKS_ROBIN.h Ver arquivo

111
 #define LED_PIN            PB2
111
 #define LED_PIN            PB2
112
 
112
 
113
 /**
113
 /**
114
- * Note: MKS Robin TFT screens use various TFT controllers. Supported screens
115
- * are based on the ILI9341, ILI9328 and ST7798V. Define init sequences for
116
- * other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
114
+ * Note: MKS Robin TFT screens use various TFT controllers
115
+ * Supported screens are based on the ILI9341 and ST7789V (320x240), ILI9328 and 9488 are not.
116
+ * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
117
  *
117
  *
118
  * If the screen stays white, disable 'LCD_RESET_PIN'
118
  * If the screen stays white, disable 'LCD_RESET_PIN'
119
  * to let the bootloader init the screen.
119
  * to let the bootloader init the screen.
126
 #define FSMC_CS_PIN        PG12  // NE4
126
 #define FSMC_CS_PIN        PG12  // NE4
127
 #define FSMC_RS_PIN        PF0   // A0
127
 #define FSMC_RS_PIN        PF0   // A0
128
 
128
 
129
+#define LCD_USE_DMA_FSMC   // Use DMA transfers to send data to the TFT
130
+#define FSMC_DMA_DEV       DMA2
131
+#define FSMC_DMA_CHANNEL   DMA_CH5
132
+
129
 #if ENABLED(TOUCH_BUTTONS)
133
 #if ENABLED(TOUCH_BUTTONS)
130
   #define TOUCH_CS_PIN     PB1   // SPI2_NSS
134
   #define TOUCH_CS_PIN     PB1   // SPI2_NSS
131
   #define TOUCH_SCK_PIN    PB13  // SPI2_SCK
135
   #define TOUCH_SCK_PIN    PB13  // SPI2_SCK

+ 3
- 3
platformio.ini Ver arquivo

387
 board         = genericSTM32F103ZE
387
 board         = genericSTM32F103ZE
388
 extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin.py
388
 extra_scripts = buildroot/share/PlatformIO/scripts/mks_robin.py
389
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
389
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
390
-  ${common.build_flags} -std=gnu++14
390
+  ${common.build_flags} -std=gnu++14 -DSTM32_XL_DENSITY
391
 build_unflags = -std=gnu++11
391
 build_unflags = -std=gnu++11
392
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
392
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
393
 lib_deps      = ${common.lib_deps}
393
 lib_deps      = ${common.lib_deps}
447
 board         = genericSTM32F103ZE
447
 board         = genericSTM32F103ZE
448
 extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
448
 extra_scripts = buildroot/share/PlatformIO/scripts/jgaurora_a5s_a1_with_bootloader.py
449
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
449
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
450
-  ${common.build_flags} -DSTM32F1xx -std=gnu++14
450
+  ${common.build_flags} -DSTM32F1xx -std=gnu++14 -DSTM32_XL_DENSITY
451
 build_unflags = -std=gnu++11
451
 build_unflags = -std=gnu++11
452
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
452
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
453
 lib_deps      = ${common.lib_deps}
453
 lib_deps      = ${common.lib_deps}
547
 board         = genericSTM32F103ZE
547
 board         = genericSTM32F103ZE
548
 extra_scripts = buildroot/share/PlatformIO/scripts/chitu_crypt.py
548
 extra_scripts = buildroot/share/PlatformIO/scripts/chitu_crypt.py
549
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
549
 build_flags   = !python Marlin/src/HAL/HAL_STM32F1/build_flags.py
550
-  ${common.build_flags} -DSTM32F1xx -std=gnu++14
550
+  ${common.build_flags} -DSTM32F1xx -std=gnu++14 -DSTM32_XL_DENSITY
551
 build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
551
 build_unflags = -std=gnu++11 -DCONFIG_MAPLE_MINI_NO_DISABLE_DEBUG= -DERROR_LED_PORT=GPIOE -DERROR_LED_PIN=6
552
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
552
 src_filter    = ${common.default_src_filter} +<src/HAL/HAL_STM32F1>
553
 lib_deps      = ${common.lib_deps}
553
 lib_deps      = ${common.lib_deps}

Carregando…
Cancelar
Salvar