Selaa lähdekoodia

🎨 Minor cleanup of TFT/FSMC pins

Scott Lahteine 2 vuotta sitten
vanhempi
commit
3bc1d2dd85

+ 1
- 5
Marlin/src/pins/stm32f1/pins_CHITU3D_V5.h Näytä tiedosto

@@ -117,13 +117,9 @@
117 117
 #define W25QXX_SCK_PIN                      PB13
118 118
 
119 119
 //
120
-// TronXY TFT Support
120
+// TFT with FSMC interface
121 121
 //
122
-
123 122
 #if HAS_FSMC_TFT
124
-
125
-  // Shared FSMC
126
-
127 123
   #define TOUCH_CS_PIN                      PB7   // SPI1_NSS
128 124
   #define TOUCH_SCK_PIN                     PA5   // SPI1_SCK
129 125
   #define TOUCH_MISO_PIN                    PA6   // SPI1_MISO

+ 1
- 6
Marlin/src/pins/stm32f1/pins_CHITU3D_V6.h Näytä tiedosto

@@ -132,13 +132,9 @@
132 132
 #define W25QXX_SCK_PIN                      PB13
133 133
 
134 134
 //
135
-// TronXY TFT Support
135
+// TFT with FSMC interface
136 136
 //
137
-
138 137
 #if HAS_FSMC_TFT
139
-
140
-  // Shared FSMC
141
-
142 138
   #define TOUCH_CS_PIN                      PB7   // SPI1_NSS
143 139
   #define TOUCH_SCK_PIN                     PA5   // SPI1_SCK
144 140
   #define TOUCH_MISO_PIN                    PA6   // SPI1_MISO
@@ -152,7 +148,6 @@
152 148
   #define FSMC_RS_PIN                       PD11
153 149
   #define FSMC_DMA_DEV                      DMA2
154 150
   #define FSMC_DMA_CHANNEL               DMA_CH5
155
-
156 151
 #endif
157 152
 
158 153
 #if ENABLED(TFT_LVGL_UI)

+ 11
- 7
Marlin/src/pins/stm32f1/pins_FLSUN_HISPEED.h Näytä tiedosto

@@ -271,11 +271,9 @@
271 271
   #error "FLSun HiSpeed default BEEPER_PIN is not a SPEAKER."
272 272
 #endif
273 273
 
274
-#if HAS_FSMC_TFT || HAS_GRAPHICAL_TFT
275
-  #define TFT_CS_PIN                        PD7   // NE4
276
-  #define TFT_RS_PIN                        PD11  // A0
277
-#endif
278
-
274
+//
275
+// TFT with FSMC interface
276
+//
279 277
 #if HAS_FSMC_TFT
280 278
   /**
281 279
    * Note: MKS Robin TFT screens use various TFT controllers
@@ -291,12 +289,16 @@
291 289
    */
292 290
   //#define TFT_RESET_PIN                   PC6   // FSMC_RST
293 291
   #define TFT_BACKLIGHT_PIN                 PD13
294
-  #define FSMC_CS_PIN                 TFT_CS_PIN  // NE4
295
-  #define FSMC_RS_PIN                 TFT_RS_PIN  // A0
296 292
 
297 293
   #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
294
+  #define FSMC_CS_PIN                       PD7   // NE4
295
+  #define FSMC_RS_PIN                       PD11  // A0
298 296
   #define FSMC_DMA_DEV                      DMA2
299 297
   #define FSMC_DMA_CHANNEL               DMA_CH5
298
+
299
+  #define TFT_CS_PIN                  TFT_CS_PIN
300
+  #define TFT_RS_PIN                  TFT_RS_PIN
301
+
300 302
   #ifdef TFT_CLASSIC_UI
301 303
     #define TFT_MARLINBG_COLOR            0x3186  // Grey
302 304
     #define TFT_MARLINUI_COLOR            0xC7B6  // Green
@@ -307,6 +309,8 @@
307 309
 #elif HAS_GRAPHICAL_TFT
308 310
   #define TFT_RESET_PIN                     PC6
309 311
   #define TFT_BACKLIGHT_PIN                 PD13
312
+  #define TFT_CS_PIN                        PD7   // NE4
313
+  #define TFT_RS_PIN                        PD11  // A0
310 314
 #endif
311 315
 
312 316
 #if NEED_TOUCH_PINS

+ 17
- 7
Marlin/src/pins/stm32f1/pins_JGAURORA_A5S_A1.h Näytä tiedosto

@@ -26,6 +26,8 @@
26 26
   *  ║║ ╦╠═╣│ │├┬┘│ │├┬┘├─┤╠╣ │ │├┬┘│ ││││ │  │ ││││
27 27
   * ╚╝╚═╝╩ ╩└─┘┴└─└─┘┴└─┴ ┴╚  └─┘┴└─└─┘┴ ┴o└─┘└─┘┴ ┴
28 28
   *   Pin assignments for 32-bit JGAurora A5S & A1
29
+  *
30
+  * https://jgaurorawiki.com/_media/jgaurora_a5s_a1_pinout.png
29 31
   */
30 32
 
31 33
 #include "env_validate.h"
@@ -102,15 +104,20 @@
102 104
 #define FIL_RUNOUT_PIN                      PC7
103 105
 
104 106
 //
105
-// LCD
107
+// TFT with FSMC interface
106 108
 //
107
-#define LCD_BACKLIGHT_PIN                   PF11
108
-#define FSMC_CS_PIN                         PD7
109
-#define FSMC_RS_PIN                         PG0
109
+#if HAS_FSMC_TFT
110
+  #define LCD_BACKLIGHT_PIN                 PF11
111
+  #define FSMC_CS_PIN                       PD7
112
+  #define FSMC_RS_PIN                       PG0
110 113
 
111
-#define LCD_USE_DMA_FSMC                          // Use DMA transfers to send data to the TFT
112
-#define FSMC_DMA_DEV                        DMA2
113
-#define FSMC_DMA_CHANNEL                 DMA_CH5
114
+  #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
115
+  #define FSMC_DMA_DEV                      DMA2
116
+  #define FSMC_DMA_CHANNEL               DMA_CH5
117
+
118
+  #define TFT_CS_PIN                 FSMC_CS_PIN
119
+  #define TFT_RS_PIN                 FSMC_RS_PIN
120
+#endif
114 121
 
115 122
 //
116 123
 // SD Card
@@ -129,4 +136,7 @@
129 136
 #if NEED_TOUCH_PINS
130 137
   #define TOUCH_CS_PIN                      PA4
131 138
   #define TOUCH_INT_PIN                     PC4
139
+  #define TOUCH_MISO_PIN                    PA6
140
+  #define TOUCH_MOSI_PIN                    PA7
141
+  #define TOUCH_SCK_PIN                     PA5
132 142
 #endif

+ 19
- 11
Marlin/src/pins/stm32f1/pins_LONGER3D_LK.h Näytä tiedosto

@@ -117,20 +117,28 @@
117 117
   //#undef Z_MAX_PIN                              // Uncomment if using ZMAX connector (PE5)
118 118
 #endif
119 119
 
120
-#define TFT_RESET_PIN                       PC4   // pin 33
121
-#define TFT_BACKLIGHT_PIN                   PD12  // pin 59
122
-#define FSMC_CS_PIN                         PD7   // pin 88 = FSMC_NE1
123
-#define FSMC_RS_PIN                         PD11  // pin 58 A16 Register. Only one address needed
120
+//
121
+// TFT with FSMC interface
122
+//
123
+#if HAS_FSMC_TFT
124
+  #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
125
+  #define FSMC_CS_PIN                       PD7   // pin 88 = FSMC_NE1
126
+  #define FSMC_RS_PIN                       PD11  // pin 58 A16 Register. Only one address needed
127
+  #define FSMC_DMA_DEV                      DMA2
128
+  #define FSMC_DMA_CHANNEL               DMA_CH5
124 129
 
125
-#define LCD_USE_DMA_FSMC                          // Use DMA transfers to send data to the TFT
126
-#define FSMC_DMA_DEV                        DMA2
127
-#define FSMC_DMA_CHANNEL                 DMA_CH5
130
+  #define TFT_CS_PIN                 FSMC_CS_PIN
131
+  #define TFT_RS_PIN                 FSMC_RS_PIN
128 132
 
129
-#define DOGLCD_MOSI                         -1    // Prevent auto-define by Conditionals_post.h
130
-#define DOGLCD_SCK                          -1
133
+  #define TFT_RESET_PIN                     PC4   // pin 33
134
+  #define TFT_BACKLIGHT_PIN                 PD12  // pin 59
131 135
 
132
-// Buffer for Color UI
133
-#define TFT_BUFFER_SIZE                     3200
136
+  #define DOGLCD_MOSI                       -1    // Prevent auto-define by Conditionals_post.h
137
+  #define DOGLCD_SCK                        -1
138
+
139
+  // Buffer for Color UI
140
+  #define TFT_BUFFER_SIZE                   3200
141
+#endif
134 142
 
135 143
 /**
136 144
  * Note: Alfawise U20/U30 boards DON'T use SPI2, as the hardware designer

+ 9
- 12
Marlin/src/pins/stm32f1/pins_MINGDA_MPX_ARM_MINI.h Näytä tiedosto

@@ -133,11 +133,9 @@
133 133
 //
134 134
 #define BEEPER_PIN                          PE4
135 135
 
136
-/**
137
- * Note: MKS Robin TFT screens use various TFT controllers.
138
- * If the screen stays white, disable 'LCD_RESET_PIN'
139
- * to let the bootloader init the screen.
140
- */
136
+//
137
+// TFT with FSMC interface
138
+//
141 139
 #if HAS_FSMC_TFT
142 140
   /**
143 141
    * Note: MKS Robin TFT screens use various TFT controllers
@@ -151,18 +149,17 @@
151 149
    * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
152 150
    * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
153 151
    */
154
-  #define TFT_CS_PIN                        PD7   // NE4
155
-  #define TFT_RS_PIN                        PG0   // A0
156
-
157
-  #define FSMC_CS_PIN                 TFT_CS_PIN
158
-  #define FSMC_RS_PIN                 TFT_RS_PIN
152
+  #define TFT_RESET_PIN                     PF15
153
+  #define TFT_BACKLIGHT_PIN                 PF11
159 154
 
160 155
   #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
156
+  #define FSMC_CS_PIN                       PD7   // NE4
157
+  #define FSMC_RS_PIN                       PG0   // A0
161 158
   #define FSMC_DMA_DEV                      DMA2
162 159
   #define FSMC_DMA_CHANNEL               DMA_CH5
163 160
 
164
-  #define TFT_RESET_PIN                     PF15
165
-  #define TFT_BACKLIGHT_PIN                 PF11
161
+  #define TFT_CS_PIN                 FSMC_CS_PIN
162
+  #define TFT_RS_PIN                 FSMC_RS_PIN
166 163
 
167 164
   #define TOUCH_BUTTONS_HW_SPI
168 165
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          1

+ 7
- 8
Marlin/src/pins/stm32f1/pins_MKS_ROBIN.h Näytä tiedosto

@@ -155,7 +155,7 @@
155 155
 #define WIFI_IO0_PIN                        PG1
156 156
 
157 157
 //
158
-// LCD screen
158
+// TFT with FSMC interface
159 159
 //
160 160
 #if HAS_FSMC_TFT
161 161
   /**
@@ -170,18 +170,17 @@
170 170
    * Setting an 'TFT_RESET_PIN' may cause a flicker when entering the LCD menu
171 171
    * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
172 172
    */
173
-  #define TFT_CS_PIN                        PG12  // NE4
174
-  #define TFT_RS_PIN                        PF0   // A0
175
-
176
-  #define FSMC_CS_PIN                 TFT_CS_PIN
177
-  #define FSMC_RS_PIN                 TFT_RS_PIN
173
+  #define TFT_RESET_PIN                     PF6
174
+  #define TFT_BACKLIGHT_PIN                 PG11
178 175
 
179 176
   #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
177
+  #define FSMC_CS_PIN                       PG12  // NE4
178
+  #define FSMC_RS_PIN                       PF0   // A0
180 179
   #define FSMC_DMA_DEV                      DMA2
181 180
   #define FSMC_DMA_CHANNEL               DMA_CH5
182 181
 
183
-  #define TFT_RESET_PIN                     PF6
184
-  #define TFT_BACKLIGHT_PIN                 PG11
182
+  #define TFT_CS_PIN                 FSMC_CS_PIN
183
+  #define TFT_RS_PIN                 FSMC_RS_PIN
185 184
 
186 185
   #define TOUCH_BUTTONS_HW_SPI
187 186
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          2

+ 11
- 9
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO.h Näytä tiedosto

@@ -172,13 +172,18 @@
172 172
 //
173 173
 #define BEEPER_PIN                          PC5
174 174
 
175
-/**
176
- * Note: MKS Robin TFT screens use various TFT controllers.
177
- * If the screen stays white, disable 'TFT_RESET_PIN'
178
- * to let the bootloader init the screen.
179
- */
180
-// Shared FSMC Configs
175
+//
176
+// TFT with FSMC interface
177
+//
181 178
 #if HAS_FSMC_TFT
179
+  /**
180
+   * Note: MKS Robin TFT screens use various TFT controllers.
181
+   * If the screen stays white, disable 'TFT_RESET_PIN'
182
+   * to let the bootloader init the screen.
183
+   */
184
+  #define TFT_RESET_PIN                     PC6   // FSMC_RST
185
+  #define TFT_BACKLIGHT_PIN                 PD13
186
+
182 187
   #define DOGLCD_MOSI                       -1    // Prevent auto-define by Conditionals_post.h
183 188
   #define DOGLCD_SCK                        -1
184 189
 
@@ -187,9 +192,6 @@
187 192
   #define TOUCH_MISO_PIN                    PB14  // SPI2_MISO
188 193
   #define TOUCH_MOSI_PIN                    PB15  // SPI2_MOSI
189 194
 
190
-  #define TFT_RESET_PIN                     PC6   // FSMC_RST
191
-  #define TFT_BACKLIGHT_PIN                 PD13
192
-
193 195
   #define LCD_USE_DMA_FSMC                        // Use DMA transfers to send data to the TFT
194 196
   #define FSMC_CS_PIN                       PD7
195 197
   #define FSMC_RS_PIN                       PD11

+ 11
- 7
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_PRO.h Näytä tiedosto

@@ -205,12 +205,18 @@
205 205
   #error "No custom SD drive cable defined for this board."
206 206
 #endif
207 207
 
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
- */
208
+//
209
+// TFT with FSMC interface
210
+//
213 211
 #if HAS_FSMC_TFT
212
+  /**
213
+   * Note: MKS Robin TFT screens use various TFT controllers.
214
+   * If the screen stays white, disable 'LCD_RESET_PIN'
215
+   * to let the bootloader init the screen.
216
+   */
217
+  #define TFT_RESET_PIN            LCD_RESET_PIN
218
+  #define TFT_BACKLIGHT_PIN    LCD_BACKLIGHT_PIN
219
+
214 220
   #define FSMC_CS_PIN                       PD7   // NE4
215 221
   #define FSMC_RS_PIN                       PD11  // A0
216 222
   #define FSMC_DMA_DEV                      DMA2
@@ -221,8 +227,6 @@
221 227
 
222 228
   #define LCD_RESET_PIN                     PF6
223 229
   #define LCD_BACKLIGHT_PIN                 PD13
224
-  #define TFT_RESET_PIN            LCD_RESET_PIN
225
-  #define TFT_BACKLIGHT_PIN    LCD_BACKLIGHT_PIN
226 230
 
227 231
   #define TFT_BUFFER_SIZE                  14400
228 232
 

+ 15
- 11
Marlin/src/pins/stm32f1/pins_TRIGORILLA_PRO.h Näytä tiedosto

@@ -126,20 +126,24 @@
126 126
 //#define POWER_LOSS_PIN                    PG2   // PG4 PW_DET
127 127
 #define FIL_RUNOUT_PIN                      PA15  // MT_DET
128 128
 
129
-/**
130
- * Note: MKS Robin TFT screens use various TFT controllers
131
- * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
132
- * ILI9488 is not supported.
133
- * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
134
- *
135
- * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
136
- *
137
- * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
138
- * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
139
- */
129
+//
130
+// TFT with FSMC interface
131
+//
140 132
 #if HAS_FSMC_TFT
133
+  /**
134
+   * Note: MKS Robin TFT screens use various TFT controllers
135
+   * Supported screens are based on the ILI9341, ST7789V and ILI9328 (320x240)
136
+   * ILI9488 is not supported.
137
+   * Define init sequences for other screens in u8g_dev_tft_320x240_upscale_from_128x64.cpp
138
+   *
139
+   * If the screen stays white, disable 'LCD_RESET_PIN' to let the bootloader init the screen.
140
+   *
141
+   * Setting an 'LCD_RESET_PIN' may cause a flicker when entering the LCD menu
142
+   * because Marlin uses the reset as a failsafe to revive a glitchy LCD.
143
+   */
141 144
   #define TFT_RESET_PIN                     PF11
142 145
   #define TFT_BACKLIGHT_PIN                 PD13
146
+
143 147
   #define FSMC_CS_PIN                       PD7   // NE4
144 148
   #define FSMC_RS_PIN                       PD11  // A0
145 149
 

+ 12
- 8
Marlin/src/pins/stm32f4/pins_ANET_ET4.h Näytä tiedosto

@@ -136,14 +136,18 @@
136 136
 //
137 137
 // LCD / Controller
138 138
 //
139
-#define TFT_RESET_PIN                       PE6
140
-#define TFT_CS_PIN                          PD7
141
-#define TFT_RS_PIN                          PD13
142
-#define TFT_INTERFACE_FSMC_8BIT
143
-
144
-#define LCD_USE_DMA_FSMC                          // Use DMA transfers to send data to the TFT
145
-#define FSMC_CS_PIN                   TFT_CS_PIN
146
-#define FSMC_RS_PIN                   TFT_RS_PIN
139
+#if HAS_SPI_TFT || HAS_FSMC_TFT
140
+  #define TFT_RESET_PIN                     PE6
141
+  #define TFT_CS_PIN                        PD7
142
+  #define TFT_RS_PIN                        PD13
143
+
144
+  #if HAS_FSMC_TFT
145
+    #define LCD_USE_DMA_FSMC                      // Use DMA transfers to send data to the TFT
146
+    #define FSMC_CS_PIN               TFT_CS_PIN
147
+    #define FSMC_RS_PIN               TFT_RS_PIN
148
+    #define TFT_INTERFACE_FSMC_8BIT
149
+  #endif
150
+#endif
147 151
 
148 152
 //
149 153
 // Touch Screen

+ 1
- 2
Marlin/src/pins/stm32f4/pins_LERDGE_K.h Näytä tiedosto

@@ -230,9 +230,8 @@
230 230
 #define BEEPER_PIN                          PC7
231 231
 
232 232
 //
233
-// LCD / Controller
233
+// TFT with FSMC interface
234 234
 //
235
-
236 235
 #if HAS_FSMC_TFT
237 236
   //#define TFT_DRIVER             LERDGE_ST7796
238 237
 

Loading…
Peruuta
Tallenna