Browse Source

🎨 Add EXP1/2 headers, adjust TFT pins (#24230)

Scott Lahteine 2 years ago
parent
commit
7d9bd3a97c
No account linked to committer's email address

+ 1
- 1
Marlin/src/HAL/STM32F1/tft/tft_spi.cpp View File

@@ -30,7 +30,7 @@ SPIClass TFT_SPI::SPIx(1);
30 30
 
31 31
 void TFT_SPI::Init() {
32 32
   #if PIN_EXISTS(TFT_RESET)
33
-    OUT_WRITE(TFT_RST_PIN, HIGH);
33
+    OUT_WRITE(TFT_RESET_PIN, HIGH);
34 34
     delay(100);
35 35
   #endif
36 36
 

+ 1
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h View File

@@ -314,7 +314,7 @@
314 314
     #define TFT_RESET_PIN            EXP1_07_PIN
315 315
     #define TFT_BACKLIGHT_PIN        EXP1_08_PIN
316 316
 
317
-    #define TFT_RST_PIN              EXP2_04_PIN
317
+    //#define TFT_RST_PIN            EXP2_04_PIN
318 318
     #define TFT_MOSI_PIN             EXP2_05_PIN
319 319
     #define TFT_SCK_PIN              EXP2_09_PIN
320 320
     #define TFT_MISO_PIN             EXP2_10_PIN

+ 2
- 1
Marlin/src/pins/lpc1769/pins_MKS_SGEN_L_V2.h View File

@@ -339,9 +339,10 @@
339 339
       #define KILL_PIN                     -1     // NC
340 340
 
341 341
     #elif HAS_SPI_TFT                             // Config for Classic UI (emulated DOGM) and Color UI
342
+
342 343
       #define TFT_CS_PIN             EXP1_04_PIN
343
-      #define TFT_A0_PIN             EXP1_03_PIN
344 344
       #define TFT_DC_PIN             EXP1_03_PIN
345
+      #define TFT_A0_PIN             TFT_DC_PIN
345 346
       #define TFT_MISO_PIN           EXP2_10_PIN
346 347
       #define TFT_BACKLIGHT_PIN      EXP1_08_PIN
347 348
       #define TFT_RESET_PIN          EXP1_07_PIN

+ 14
- 11
Marlin/src/pins/mega/pins_CNCONTROLS_11.h View File

@@ -135,17 +135,20 @@
135 135
 //
136 136
 // LCD / Controller
137 137
 //
138
-#define BEEPER_PIN                             6
139
-
140
-// Pins for DOGM SPI LCD Support
141
-#define DOGLCD_A0                             26
142
-#define DOGLCD_CS                             24
143
-#define DOGLCD_MOSI                           -1  // Prevent auto-define by Conditionals_post.h
144
-#define DOGLCD_SCK                            -1
145
-
146
-#define BTN_EN1                               23
147
-#define BTN_EN2                               25
148
-#define BTN_ENC                               27
138
+#if HAS_WIRED_LCD
139
+  #define BEEPER_PIN                           6
140
+
141
+  #define BTN_EN1                             23
142
+  #define BTN_EN2                             25
143
+  #define BTN_ENC                             27
144
+
145
+  #if HAS_MARLINUI_U8GLIB
146
+    #define DOGLCD_A0                         26
147
+    #define DOGLCD_CS                         24
148
+    #define DOGLCD_MOSI                       -1  // Prevent auto-define by Conditionals_post.h
149
+    #define DOGLCD_SCK                        -1
150
+  #endif
151
+#endif
149 152
 
150 153
 // Hardware buttons for manual movement of XYZ
151 154
 #define SHIFT_OUT_PIN                         19

+ 14
- 12
Marlin/src/pins/mega/pins_CNCONTROLS_12.h View File

@@ -140,18 +140,20 @@
140 140
 //
141 141
 // LCD / Controller
142 142
 //
143
-#define BEEPER_PIN                            16
144
-
145
-// Pins for DOGM SPI LCD Support
146
-#define DOGLCD_A0                             39
147
-#define DOGLCD_CS                             35
148
-#define DOGLCD_MOSI                           48
149
-#define DOGLCD_SCK                            49
150
-
151
-// The encoder and click button
152
-#define BTN_EN1                               36
153
-#define BTN_EN2                               34
154
-#define BTN_ENC                               38
143
+#if HAS_WIRED_LCD
144
+  #define BEEPER_PIN                          16
145
+
146
+  #define BTN_EN1                             36
147
+  #define BTN_EN2                             34
148
+  #define BTN_ENC                             38
149
+
150
+  #if HAS_MARLINUI_U8GLIB
151
+    #define DOGLCD_A0                         39
152
+    #define DOGLCD_CS                         35
153
+    #define DOGLCD_MOSI                       48
154
+    #define DOGLCD_SCK                        49
155
+  #endif
156
+#endif
155 157
 
156 158
 // Hardware buttons for manual movement of XYZ
157 159
 #define SHIFT_OUT_PIN                         42

+ 1
- 1
Marlin/src/pins/ramps/pins_AZTEEG_X3_PRO.h View File

@@ -158,7 +158,7 @@
158 158
 #if ENABLED(CASE_LIGHT_ENABLE) && PIN_EXISTS(CASE_LIGHT) && defined(DOGLCD_A0) && DOGLCD_A0 == CASE_LIGHT_PIN
159 159
   #undef DOGLCD_A0                                // Steal pin 44 for the case light; if you have a Viki2 and have connected it
160 160
   #define DOGLCD_A0                           57  // following the Panucatt wiring diagram, you may need to tweak these pin assignments
161
-                                // as the wiring diagram uses pin 44 for DOGLCD_A0
161
+                                                  // as the wiring diagram uses pin 44 for DOGLCD_A0.
162 162
 #endif
163 163
 
164 164
 //

+ 54
- 27
Marlin/src/pins/sam/pins_RAMPS_FD_V1.h View File

@@ -134,71 +134,98 @@
134 134
 #define SDSS                                   4
135 135
 #define LED_PIN                               13
136 136
 
137
+/**        ------                     ------
138
+ *     37 |10  9 | 35      (MISO) 50 |10  9 | 76 (SCK)
139
+ *     29 | 8  7 | 27       (EN2) 31 | 8  7 |  4 (SD_SS)
140
+ *     25   6  5 | 23       (EN1) 33   6  5 | 75 (MOSI)
141
+ *     16 | 4  3 | 17       (SDD) 49 | 4  3 | RESET
142
+ *    GND | 2  1 | 5V            GND | 2  1 | --
143
+ *         ------                     ------
144
+ *          EXP1                       EXP2
145
+ */
146
+#define EXP1_03_PIN                           17
147
+#define EXP1_04_PIN                           16
148
+#define EXP1_05_PIN                           23
149
+#define EXP1_06_PIN                           25
150
+#define EXP1_07_PIN                           27
151
+#define EXP1_08_PIN                           29
152
+#define EXP1_09_PIN                           35
153
+#define EXP1_10_PIN                           37
154
+
155
+#define EXP2_03_PIN                           -1
156
+#define EXP2_04_PIN                           49
157
+#define EXP2_05_PIN                           75
158
+#define EXP2_06_PIN                           33
159
+#define EXP2_07_PIN                            4
160
+#define EXP2_08_PIN                           31
161
+#define EXP2_09_PIN                           76
162
+#define EXP2_10_PIN                           74
163
+
137 164
 //
138 165
 // LCD / Controller
139 166
 //
140 167
 #if HAS_WIRED_LCD
141 168
   // ramps-fd lcd adaptor
142 169
 
143
-  #define BEEPER_PIN                          37
144
-  #define BTN_EN1                             33
145
-  #define BTN_EN2                             31
146
-  #define BTN_ENC                             35
147
-  #define SD_DETECT_PIN                       49
170
+  #define BEEPER_PIN                 EXP1_10_PIN
171
+  #define BTN_EN1                    EXP2_06_PIN
172
+  #define BTN_EN2                    EXP2_08_PIN
173
+  #define BTN_ENC                    EXP1_09_PIN
174
+  #define SD_DETECT_PIN              EXP2_04_PIN
148 175
 
149 176
   #if IS_NEWPANEL
150
-    #define LCD_PINS_RS                       16
151
-    #define LCD_PINS_ENABLE                   17
177
+    #define LCD_PINS_RS              EXP1_04_PIN
178
+    #define LCD_PINS_ENABLE          EXP1_03_PIN
152 179
   #endif
153 180
 
154 181
   #if ENABLED(FYSETC_MINI_12864)
155 182
     #define DOGLCD_CS            LCD_PINS_ENABLE
156 183
     #define DOGLCD_A0                LCD_PINS_RS
157
-    #define DOGLCD_SCK                        76
158
-    #define DOGLCD_MOSI                       75
184
+    #define DOGLCD_SCK               EXP2_09_PIN
185
+    #define DOGLCD_MOSI              EXP2_05_PIN
159 186
 
160 187
     //#define FORCE_SOFT_SPI                      // Use this if default of hardware SPI causes display problems
161 188
                                                   //   results in LCD soft SPI mode 3, SD soft SPI mode 0
162 189
 
163
-    #define LCD_RESET_PIN                     23  // Must be high or open for LCD to operate normally.
190
+    #define LCD_RESET_PIN            EXP1_05_PIN  // Must be high or open for LCD to operate normally.
164 191
 
165 192
     #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
166 193
       #ifndef RGB_LED_R_PIN
167
-        #define RGB_LED_R_PIN                 25
194
+        #define RGB_LED_R_PIN        EXP1_06_PIN
168 195
       #endif
169 196
       #ifndef RGB_LED_G_PIN
170
-        #define RGB_LED_G_PIN                 27
197
+        #define RGB_LED_G_PIN        EXP1_07_PIN
171 198
       #endif
172 199
       #ifndef RGB_LED_B_PIN
173
-        #define RGB_LED_B_PIN                 29
200
+        #define RGB_LED_B_PIN        EXP1_08_PIN
174 201
       #endif
175 202
     #elif ENABLED(FYSETC_MINI_12864_2_1)
176
-      #define NEOPIXEL_PIN                    25
203
+      #define NEOPIXEL_PIN           EXP1_06_PIN
177 204
     #endif
178 205
 
179 206
   #elif IS_NEWPANEL
180 207
 
181
-    #define LCD_PINS_D4                       23
182
-    #define LCD_PINS_D5                       25
183
-    #define LCD_PINS_D6                       27
184
-    #define LCD_PINS_D7                       29
208
+    #define LCD_PINS_D4              EXP1_05_PIN
209
+    #define LCD_PINS_D5              EXP1_06_PIN
210
+    #define LCD_PINS_D6              EXP1_07_PIN
211
+    #define LCD_PINS_D7              EXP1_08_PIN
185 212
 
186 213
     #if ENABLED(MINIPANEL)
187
-      #define DOGLCD_CS                       25
188
-      #define DOGLCD_A0                       27
214
+      #define DOGLCD_CS              EXP1_06_PIN
215
+      #define DOGLCD_A0              EXP1_07_PIN
189 216
     #endif
190 217
 
191 218
   #endif
192 219
 
193 220
   #if ANY(VIKI2, miniVIKI)
194
-    #define DOGLCD_A0                         16
221
+    #define DOGLCD_A0                EXP1_04_PIN
195 222
     #define KILL_PIN                          51
196
-    #define STAT_LED_BLUE_PIN                 29
197
-    #define STAT_LED_RED_PIN                  23
198
-    #define DOGLCD_CS                         17
199
-    #define DOGLCD_SCK                        76  // SCK_PIN   - Required for DUE Hardware SPI
200
-    #define DOGLCD_MOSI                       75  // MOSI_PIN
201
-    #define DOGLCD_MISO                       74  // MISO_PIN
223
+    #define STAT_LED_BLUE_PIN        EXP1_08_PIN
224
+    #define STAT_LED_RED_PIN         EXP1_05_PIN
225
+    #define DOGLCD_CS                EXP1_03_PIN
226
+    #define DOGLCD_SCK               EXP2_09_PIN  // SCK_PIN   - Required for DUE Hardware SPI
227
+    #define DOGLCD_MOSI              EXP2_05_PIN  // MOSI_PIN
228
+    #define DOGLCD_MISO              EXP2_10_PIN  // MISO_PIN
202 229
   #endif
203 230
 
204 231
   #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)

+ 53
- 25
Marlin/src/pins/sam/pins_RURAMPS4D_11.h View File

@@ -153,7 +153,7 @@
153 153
 // SPI for MAX Thermocouple
154 154
 /*
155 155
 #if DISABLED(SDSUPPORT)
156
-  #define TEMP_0_CS_PIN                       53
156
+  #define TEMP_0_CS_PIN              EXP1_03_PIN
157 157
 #else
158 158
   #define TEMP_0_CS_PIN                       49
159 159
 #endif
@@ -190,59 +190,87 @@
190 190
 // 32Mb FLASH
191 191
 //#define SPI_FLASH_CS_PIN        ?
192 192
 
193
+/**
194
+ *              ------                                ------
195
+ * (BEEPER) 62 |10  9 | 40 (BTN_ENC)  (MISO)      74 |10  9 | 76 (SCK)
196
+ * (LCD_EN) 64 | 8  7 | 63 (LCD_RS)   (BTN_EN1)   44 | 8  7 | 10 (SD_SS)
197
+ * (LCD_D4) 48 | 6  5   50 (LCD_D5)   (BTN_EN2)   42 | 6  5   75 (MOSI)
198
+ * (LCD_D6) 52 | 4  3 | 53 (LCD_D7)   (SD_DETECT) 51 | 4  3 | RESET
199
+ *         GND | 2  1 | 5V                       GND | 2  1 | --
200
+ *              ------                                ------
201
+ *               EXP1                                  EXP2
202
+ */
203
+#define EXP1_03_PIN                           53
204
+#define EXP1_04_PIN                           52
205
+#define EXP1_05_PIN                           50
206
+#define EXP1_06_PIN                           48
207
+#define EXP1_07_PIN                           63
208
+#define EXP1_08_PIN                           64
209
+#define EXP1_09_PIN                           40
210
+#define EXP1_10_PIN                           62
211
+
212
+#define EXP2_03_PIN                           -1  // RESET
213
+#define EXP2_04_PIN                           51
214
+#define EXP2_05_PIN                           75  // MOSI
215
+#define EXP2_06_PIN                           42
216
+#define EXP2_07_PIN                           10
217
+#define EXP2_08_PIN                           44
218
+#define EXP2_09_PIN                           76  // SCK
219
+#define EXP2_10_PIN                           74  // MISO
220
+
193 221
 //
194 222
 // LCD / Controller
195 223
 //
196 224
 #if HAS_WIRED_LCD
197 225
 
198 226
   #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC)
199
-    #define BEEPER_PIN                        62
200
-    #define LCD_PINS_D4                       48
201
-    #define LCD_PINS_D5                       50
202
-    #define LCD_PINS_D6                       52
203
-    #define LCD_PINS_D7                       53
204
-    #define SD_DETECT_PIN                     51
227
+    #define BEEPER_PIN               EXP1_10_PIN
228
+    #define LCD_PINS_D4              EXP1_06_PIN
229
+    #define LCD_PINS_D5              EXP1_05_PIN
230
+    #define LCD_PINS_D6              EXP1_04_PIN
231
+    #define LCD_PINS_D7              EXP1_03_PIN
232
+    #define SD_DETECT_PIN            EXP2_04_PIN
205 233
   #endif
206 234
 
207 235
   #if EITHER(RADDS_DISPLAY, IS_RRD_SC)
208 236
 
209
-    #define LCD_PINS_RS                       63
210
-    #define LCD_PINS_ENABLE                   64
237
+    #define LCD_PINS_RS              EXP1_07_PIN
238
+    #define LCD_PINS_ENABLE          EXP1_08_PIN
211 239
 
212 240
   #elif IS_RRD_FG_SC
213 241
 
214
-    #define LCD_PINS_RS                       52
215
-    #define LCD_PINS_ENABLE                   53
242
+    #define LCD_PINS_RS              EXP1_04_PIN
243
+    #define LCD_PINS_ENABLE          EXP1_03_PIN
216 244
 
217 245
   #elif HAS_U8GLIB_I2C_OLED
218 246
 
219
-    #define BEEPER_PIN                        62
220
-    #define LCD_SDSS                          10
221
-    #define SD_DETECT_PIN                     51
247
+    #define BEEPER_PIN               EXP1_10_PIN
248
+    #define LCD_SDSS                 EXP2_07_PIN
249
+    #define SD_DETECT_PIN            EXP2_04_PIN
222 250
 
223 251
   #elif ENABLED(FYSETC_MINI_12864)
224 252
 
225
-    #define BEEPER_PIN                        62
226
-    #define DOGLCD_CS                         64
227
-    #define DOGLCD_A0                         63
253
+    #define BEEPER_PIN               EXP1_10_PIN
254
+    #define DOGLCD_CS                EXP1_08_PIN
255
+    #define DOGLCD_A0                EXP1_07_PIN
228 256
 
229 257
     //#define FORCE_SOFT_SPI                      // Use this if default of hardware SPI causes display problems
230 258
                                                   //   results in LCD soft SPI mode 3, SD soft SPI mode 0
231 259
 
232
-    #define LCD_RESET_PIN                     48  // Must be high or open for LCD to operate normally.
260
+    #define LCD_RESET_PIN            EXP1_06_PIN  // Must be high or open for LCD to operate normally.
233 261
 
234 262
     #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
235 263
       #ifndef RGB_LED_R_PIN
236
-        #define RGB_LED_R_PIN                 50  // D5
264
+        #define RGB_LED_R_PIN        EXP1_05_PIN  // D5
237 265
       #endif
238 266
       #ifndef RGB_LED_G_PIN
239
-        #define RGB_LED_G_PIN                 52  // D6
267
+        #define RGB_LED_G_PIN        EXP1_04_PIN  // D6
240 268
       #endif
241 269
       #ifndef RGB_LED_B_PIN
242
-        #define RGB_LED_B_PIN                 53  // D7
270
+        #define RGB_LED_B_PIN        EXP1_03_PIN  // D7
243 271
       #endif
244 272
     #elif ENABLED(FYSETC_MINI_12864_2_1)
245
-      #define NEOPIXEL_PIN                    50  // D5
273
+      #define NEOPIXEL_PIN           EXP1_05_PIN  // D5
246 274
     #endif
247 275
 
248 276
   #elif ENABLED(SPARK_FULL_GRAPHICS)
@@ -259,9 +287,9 @@
259 287
   #endif // SPARK_FULL_GRAPHICS
260 288
 
261 289
   #if IS_NEWPANEL
262
-    #define BTN_EN1                           44
263
-    #define BTN_EN2                           42
264
-    #define BTN_ENC                           40
290
+    #define BTN_EN1                  EXP2_08_PIN
291
+    #define BTN_EN2                  EXP2_06_PIN
292
+    #define BTN_ENC                  EXP1_09_PIN
265 293
   #endif
266 294
 
267 295
   #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)

+ 55
- 28
Marlin/src/pins/sam/pins_RURAMPS4D_13.h View File

@@ -173,74 +173,101 @@
173 173
 // 32Mb FLASH
174 174
 //#define SPI_FLASH_CS_PIN        ?
175 175
 
176
+/**
177
+ *              ------                                ------
178
+ * (BEEPER) 62 |10  9 | 40 (BTN_ENC)  (MISO)      74 |10  9 | 76 (SCK)
179
+ * (LCD_EN) 64 | 8  7 | 63 (LCD_RS)   (BTN_EN1)   44 | 8  7 | 10 (SD_SS)
180
+ * (LCD_D4) 48 | 6  5   50 (LCD_D5)   (BTN_EN2)   42 | 6  5   75 (MOSI)
181
+ * (LCD_D6) 52 | 4  3 | 53 (LCD_D7)   (SD_DETECT) 51 | 4  3 | RESET
182
+ *         GND | 2  1 | 5V                       GND | 2  1 | --
183
+ *              ------                                ------
184
+ *               EXP1                                  EXP2
185
+ */
186
+#define EXP1_03_PIN                           53
187
+#define EXP1_04_PIN                           52
188
+#define EXP1_05_PIN                           50
189
+#define EXP1_06_PIN                           48
190
+#define EXP1_07_PIN                           63
191
+#define EXP1_08_PIN                           64
192
+#define EXP1_09_PIN                           40
193
+#define EXP1_10_PIN                           62
194
+
195
+#define EXP2_03_PIN                           -1  // RESET
196
+#define EXP2_04_PIN                           51
197
+#define EXP2_05_PIN                           75  // MOSI
198
+#define EXP2_06_PIN                           42
199
+#define EXP2_07_PIN                           10
200
+#define EXP2_08_PIN                           44
201
+#define EXP2_09_PIN                           76  // SCK
202
+#define EXP2_10_PIN                           74  // MISO
203
+
176 204
 //
177 205
 // LCD / Controller
178 206
 //
179 207
 #if HAS_WIRED_LCD
180 208
 
181 209
   #if ANY(RADDS_DISPLAY, IS_RRD_SC, IS_RRD_FG_SC)
182
-    #define BEEPER_PIN                        62
183
-    #define LCD_PINS_D4                       48
184
-    #define LCD_PINS_D5                       50
185
-    #define LCD_PINS_D6                       52
186
-    #define LCD_PINS_D7                       53
187
-    #define SD_DETECT_PIN                     51
210
+    #define BEEPER_PIN               EXP1_10_PIN
211
+    #define LCD_PINS_D4              EXP1_06_PIN
212
+    #define LCD_PINS_D5              EXP1_05_PIN
213
+    #define LCD_PINS_D6              EXP1_04_PIN
214
+    #define LCD_PINS_D7              EXP1_03_PIN
215
+    #define SD_DETECT_PIN            EXP2_04_PIN
188 216
   #endif
189 217
 
190 218
   #if EITHER(RADDS_DISPLAY, IS_RRD_SC)
191 219
 
192
-    #define LCD_PINS_RS                       63
193
-    #define LCD_PINS_ENABLE                   64
220
+    #define LCD_PINS_RS              EXP1_07_PIN
221
+    #define LCD_PINS_ENABLE          EXP1_08_PIN
194 222
 
195 223
   #elif IS_RRD_FG_SC
196 224
 
197
-    #define LCD_PINS_RS                       52
198
-    #define LCD_PINS_ENABLE                   53
225
+    #define LCD_PINS_RS              EXP1_04_PIN
226
+    #define LCD_PINS_ENABLE          EXP1_03_PIN
199 227
 
200 228
   #elif HAS_U8GLIB_I2C_OLED
201 229
 
202
-    #define BEEPER_PIN                        62
203
-    #define LCD_SDSS                          10
204
-    #define SD_DETECT_PIN                     51
230
+    #define BEEPER_PIN               EXP1_10_PIN
231
+    #define LCD_SDSS                 EXP2_07_PIN
232
+    #define SD_DETECT_PIN            EXP2_04_PIN
205 233
 
206 234
   #elif ENABLED(FYSETC_MINI_12864)
207 235
 
208
-    #define BEEPER_PIN                        62
209
-    #define DOGLCD_CS                         64
210
-    #define DOGLCD_A0                         63
236
+    #define BEEPER_PIN               EXP1_10_PIN
237
+    #define DOGLCD_CS                EXP1_08_PIN
238
+    #define DOGLCD_A0                EXP1_07_PIN
211 239
 
212 240
     //#define FORCE_SOFT_SPI                      // Use this if default of hardware SPI causes display problems
213 241
                                                   //   results in LCD soft SPI mode 3, SD soft SPI mode 0
214 242
 
215
-    #define LCD_RESET_PIN                     48  // Must be high or open for LCD to operate normally.
243
+    #define LCD_RESET_PIN            EXP1_06_PIN  // Must be high or open for LCD to operate normally.
216 244
 
217 245
     #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
218 246
       #ifndef RGB_LED_R_PIN
219
-        #define RGB_LED_R_PIN                 50  // D5
247
+        #define RGB_LED_R_PIN        EXP1_05_PIN  // D5
220 248
       #endif
221 249
       #ifndef RGB_LED_G_PIN
222
-        #define RGB_LED_G_PIN                 52  // D6
250
+        #define RGB_LED_G_PIN        EXP1_04_PIN  // D6
223 251
       #endif
224 252
       #ifndef RGB_LED_B_PIN
225
-        #define RGB_LED_B_PIN                 53  // D7
253
+        #define RGB_LED_B_PIN        EXP1_03_PIN  // D7
226 254
       #endif
227 255
     #elif ENABLED(FYSETC_MINI_12864_2_1)
228
-      #define NEOPIXEL_PIN                    50  // D5
256
+      #define NEOPIXEL_PIN           EXP1_05_PIN  // D5
229 257
     #endif
230 258
 
231 259
   #elif ENABLED(MKS_MINI_12864)
260
+    #define DOGLCD_A0                EXP1_04_PIN
261
+    #define DOGLCD_CS                EXP1_05_PIN
232 262
 
233
-    #define DOGLCD_A0                         52
234
-    #define DOGLCD_CS                         50
235
-
236
-    #define SD_DETECT_PIN                     51
263
+    #define SD_DETECT_PIN            EXP2_04_PIN
237 264
 
238 265
   #endif
239 266
 
240 267
   #if IS_NEWPANEL
241
-    #define BTN_EN1                           44
242
-    #define BTN_EN2                           42
243
-    #define BTN_ENC                           40
268
+    #define BTN_EN1                  EXP2_08_PIN
269
+    #define BTN_EN2                  EXP2_06_PIN
270
+    #define BTN_ENC                  EXP1_09_PIN
244 271
   #endif
245 272
 
246 273
   #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)

+ 78
- 51
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_E3P.h View File

@@ -205,6 +205,34 @@
205 205
 
206 206
 //#define LED_PIN                           PB2
207 207
 
208
+/**
209
+ *        ------                  ------
210
+ *  PC5  |10  9 | PE13       PA6 |10  9 | PA5
211
+ *  PD13 | 8  7 | PC6        PE8 | 8  7 | PE10
212
+ *  PE14 | 6  5   PE15      PE11 | 6  5   PA7
213
+ *  PD11 | 4  3 | PD10      PE12 | 4  3 | RESET
214
+ *   GND | 2  1 | 5V         GND | 2  1 | 3.3V
215
+ *        ------                  ------
216
+ *         EXP1                    EXP2
217
+ */
218
+#define EXP1_03_PIN                         PD10
219
+#define EXP1_04_PIN                         PD11
220
+#define EXP1_05_PIN                         PE15
221
+#define EXP1_06_PIN                         PE14
222
+#define EXP1_07_PIN                         PC6
223
+#define EXP1_08_PIN                         PD13
224
+#define EXP1_09_PIN                         PE13
225
+#define EXP1_10_PIN                         PC5
226
+
227
+#define EXP2_03_PIN                         -1
228
+#define EXP2_04_PIN                         PE12
229
+#define EXP2_05_PIN                         PA7
230
+#define EXP2_06_PIN                         PE11
231
+#define EXP2_07_PIN                         PE10
232
+#define EXP2_08_PIN                         PE8
233
+#define EXP2_09_PIN                         PA5
234
+#define EXP2_10_PIN                         PA6
235
+
208 236
 //
209 237
 // SD Card
210 238
 //
@@ -219,11 +247,11 @@
219 247
   #define ONBOARD_SD_CS_PIN                 PC11
220 248
 #elif SD_CONNECTION_IS(LCD)
221 249
   #define ENABLE_SPI1
222
-  #define SDSS                              PE10
223
-  #define SD_SCK_PIN                        PA5
224
-  #define SD_MISO_PIN                       PA6
225
-  #define SD_MOSI_PIN                       PA7
226
-  #define SD_DETECT_PIN                     PE12
250
+  #define SDSS                       EXP2_07_PIN
251
+  #define SD_SCK_PIN                 EXP2_09_PIN
252
+  #define SD_MISO_PIN                EXP2_10_PIN
253
+  #define SD_MOSI_PIN                EXP2_05_PIN
254
+  #define SD_DETECT_PIN              EXP2_04_PIN
227 255
 #endif
228 256
 
229 257
 //
@@ -240,27 +268,26 @@
240 268
 
241 269
   // Shared SPI TFT
242 270
 
243
-  #define LCD_BACKLIGHT_PIN                 PD13
271
+  #define LCD_BACKLIGHT_PIN          EXP1_08_PIN
244 272
 
245
-  #define TOUCH_CS_PIN                      PE14  // SPI1_NSS
246
-  #define TOUCH_SCK_PIN                     PA5   // SPI1_SCK
247
-  #define TOUCH_MISO_PIN                    PA6   // SPI1_MISO
248
-  #define TOUCH_MOSI_PIN                    PA7   // SPI1_MOSI
273
+  #define TOUCH_CS_PIN               EXP1_06_PIN  // SPI1_NSS
274
+  #define TOUCH_SCK_PIN              EXP2_09_PIN  // SPI1_SCK
275
+  #define TOUCH_MISO_PIN             EXP2_10_PIN  // SPI1_MISO
276
+  #define TOUCH_MOSI_PIN             EXP2_05_PIN  // SPI1_MOSI
249 277
 
250
-  #define BTN_EN1                           PE8
251
-  #define BTN_EN2                           PE11
252
-  #define BTN_ENC                           PE13
278
+  #define BTN_EN1                    EXP2_08_PIN
279
+  #define BTN_EN2                    EXP2_06_PIN
280
+  #define BTN_ENC                    EXP1_09_PIN
253 281
 
254
-  #define TFT_CS_PIN                        PD11
255
-  #define TFT_SCK_PIN                       PA5
256
-  #define TFT_MISO_PIN                      PA6
257
-  #define TFT_MOSI_PIN                      PA7
258
-  #define TFT_DC_PIN                        PD10
259
-  #define TFT_RST_PIN                       PC6
282
+  #define TFT_CS_PIN                 EXP1_04_PIN
283
+  #define TFT_SCK_PIN                EXP2_09_PIN
284
+  #define TFT_MISO_PIN               EXP2_10_PIN
285
+  #define TFT_MOSI_PIN               EXP2_05_PIN
286
+  #define TFT_DC_PIN                 EXP1_03_PIN
260 287
   #define TFT_A0_PIN                  TFT_DC_PIN
261 288
 
262
-  #define TFT_RESET_PIN                     PC6
263
-  #define TFT_BACKLIGHT_PIN                 PD13
289
+  #define TFT_RESET_PIN              EXP1_07_PIN
290
+  #define TFT_BACKLIGHT_PIN    LCD_BACKLIGHT_PIN
264 291
 
265 292
   #define TOUCH_BUTTONS_HW_SPI
266 293
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          1
@@ -271,22 +298,22 @@
271 298
 
272 299
 #if ENABLED(TFT_CLASSIC_UI)
273 300
   // Emulated DOGM SPI
274
-  #define LCD_PINS_ENABLE                   PD13
275
-  #define LCD_PINS_RS                       PC6
276
-  #define BTN_ENC                           PE13
277
-  #define BTN_EN1                           PE8
278
-  #define BTN_EN2                           PE11
301
+  #define LCD_PINS_ENABLE            EXP1_08_PIN
302
+  #define LCD_PINS_RS                EXP1_07_PIN
303
+  #define BTN_ENC                    EXP1_09_PIN
304
+  #define BTN_EN1                    EXP2_08_PIN
305
+  #define BTN_EN2                    EXP2_06_PIN
279 306
 #elif ENABLED(TFT_COLOR_UI)
280 307
   #define TFT_BUFFER_SIZE                  14400
281 308
 #endif
282 309
 
283 310
 #if HAS_WIRED_LCD && !HAS_SPI_TFT
284
-  #define BEEPER_PIN                        PC5
285
-  #define BTN_ENC                           PE13
286
-  #define LCD_PINS_ENABLE                   PD13
287
-  #define LCD_PINS_RS                       PC6
288
-  #define BTN_EN1                           PE8
289
-  #define BTN_EN2                           PE11
311
+  #define BEEPER_PIN                 EXP1_10_PIN
312
+  #define BTN_ENC                    EXP1_09_PIN
313
+  #define LCD_PINS_ENABLE            EXP1_08_PIN
314
+  #define LCD_PINS_RS                EXP1_07_PIN
315
+  #define BTN_EN1                    EXP2_08_PIN
316
+  #define BTN_EN2                    EXP2_06_PIN
290 317
   #define LCD_BACKLIGHT_PIN                 -1
291 318
 
292 319
   #if ENABLED(MKS_MINI_12864)
@@ -296,18 +323,18 @@
296 323
 
297 324
     #define LCD_BACKLIGHT_PIN               -1
298 325
     #define LCD_RESET_PIN                   -1
299
-    #define DOGLCD_A0                       PD11
300
-    #define DOGLCD_CS                       PE15
301
-    #define DOGLCD_SCK                      PA5
302
-    #define DOGLCD_MOSI                     PA7
326
+    #define DOGLCD_A0                EXP1_04_PIN
327
+    #define DOGLCD_CS                EXP1_05_PIN
328
+    #define DOGLCD_SCK               EXP2_09_PIN
329
+    #define DOGLCD_MOSI              EXP2_05_PIN
303 330
 
304 331
   #elif IS_TFTGLCD_PANEL
305 332
 
306 333
     #if ENABLED(TFTGLCD_PANEL_SPI)
307
-      #define PIN_SPI_SCK                   PA5
308
-      #define PIN_TFT_MISO                  PA6
309
-      #define PIN_TFT_MOSI                  PA7
310
-      #define TFTGLCD_CS                    PE8
334
+      #define PIN_SPI_SCK            EXP2_09_PIN
335
+      #define PIN_TFT_MISO           EXP2_10_PIN
336
+      #define PIN_TFT_MOSI           EXP2_05_PIN
337
+      #define TFTGLCD_CS             EXP2_08_PIN
311 338
     #endif
312 339
 
313 340
     #ifndef BEEPER_PIN
@@ -315,14 +342,14 @@
315 342
     #endif
316 343
 
317 344
   #elif ENABLED(FYSETC_MINI_12864_2_1)
318
-    #define LCD_PINS_DC                     PC6
319
-    #define DOGLCD_CS                       PD13
345
+    #define LCD_PINS_DC              EXP1_07_PIN
346
+    #define DOGLCD_CS                EXP1_08_PIN
320 347
     #define DOGLCD_A0                  DOGLCD_A0
321 348
     #define LCD_BACKLIGHT_PIN               -1
322
-    #define LCD_RESET_PIN                   PE14
323
-    #define NEOPIXEL_PIN                    PE15
324
-    #define DOGLCD_MOSI                     PA7
325
-    #define DOGLCD_SCK                      PA5
349
+    #define LCD_RESET_PIN            EXP1_06_PIN
350
+    #define NEOPIXEL_PIN             EXP1_05_PIN
351
+    #define DOGLCD_MOSI              EXP2_05_PIN
352
+    #define DOGLCD_SCK               EXP2_09_PIN
326 353
     #if SD_CONNECTION_IS(ONBOARD)
327 354
       #define FORCE_SOFT_SPI
328 355
     #endif
@@ -330,11 +357,11 @@
330 357
 
331 358
   #else                                           // !MKS_MINI_12864
332 359
 
333
-    #define LCD_PINS_D4                     PE14
360
+    #define LCD_PINS_D4              EXP1_06_PIN
334 361
     #if IS_ULTIPANEL
335
-      #define LCD_PINS_D5                   PE15
336
-      #define LCD_PINS_D6                   PD11
337
-      #define LCD_PINS_D7                   PD10
362
+      #define LCD_PINS_D5            EXP1_05_PIN
363
+      #define LCD_PINS_D6            EXP1_04_PIN
364
+      #define LCD_PINS_D7            EXP1_03_PIN
338 365
 
339 366
       #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
340 367
         #define BTN_ENC_EN           LCD_PINS_D7  // Detect the presence of the encoder
@@ -360,7 +387,7 @@
360 387
 #endif
361 388
 
362 389
 #ifndef BEEPER_PIN
363
-  #define BEEPER_PIN                        PC5
390
+  #define BEEPER_PIN                 EXP1_10_PIN
364 391
 #endif
365 392
 
366 393
 #if ENABLED(SPEAKER) && BEEPER_PIN == PC5

+ 1
- 2
Marlin/src/pins/stm32f1/pins_MKS_ROBIN_NANO_V2.h View File

@@ -282,11 +282,10 @@
282 282
   #define TFT_MISO_PIN                      PA6
283 283
   #define TFT_MOSI_PIN                      PA7
284 284
   #define TFT_DC_PIN                        PD10
285
-  #define TFT_RST_PIN                       PC6
286 285
   #define TFT_A0_PIN                  TFT_DC_PIN
287 286
 
288 287
   #define TFT_RESET_PIN                     PC6
289
-  #define TFT_BACKLIGHT_PIN                 PD13
288
+  #define TFT_BACKLIGHT_PIN    LCD_BACKLIGHT_PIN
290 289
 
291 290
   #define TOUCH_BUTTONS_HW_SPI
292 291
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          1

+ 5
- 3
Marlin/src/pins/stm32f4/pins_BTT_SKR_V2_0_common.h View File

@@ -527,6 +527,11 @@
527 527
 #endif
528 528
 
529 529
 #if HAS_SPI_TFT
530
+
531
+  #define BTN_EN1                    EXP2_08_PIN
532
+  #define BTN_EN2                    EXP2_06_PIN
533
+  #define BTN_ENC                    EXP1_09_PIN
534
+
530 535
   //
531 536
   // e.g., BTT_TFT35_SPI_V1_0 (480x320, 3.5", SPI Stock Display with Rotary Encoder in BIQU B1 SE)
532 537
   //
@@ -542,9 +547,6 @@
542 547
   #define TOUCH_SCK_PIN              EXP1_06_PIN
543 548
   #define TOUCH_CS_PIN               EXP1_07_PIN
544 549
 
545
-  #define BTN_EN1                    EXP2_08_PIN
546
-  #define BTN_EN2                    EXP2_06_PIN
547
-  #define BTN_ENC                    EXP1_09_PIN
548 550
 #endif
549 551
 
550 552
 //

+ 3
- 3
Marlin/src/pins/stm32f4/pins_MKS_MONSTER8.h View File

@@ -289,16 +289,16 @@
289 289
   #define TFT_MISO_PIN               EXP2_10_PIN
290 290
   #define TFT_MOSI_PIN               EXP2_05_PIN
291 291
   #define TFT_DC_PIN                 EXP1_03_PIN
292
-  #define TFT_RST_PIN                EXP1_07_PIN
293 292
   #define TFT_A0_PIN                  TFT_DC_PIN
294 293
 
295 294
   #define TFT_RESET_PIN              EXP1_07_PIN
296
-  #define TFT_BACKLIGHT_PIN          EXP1_08_PIN
295
+
296
+  #define LCD_BACKLIGHT_PIN          EXP1_08_PIN
297
+  #define TFT_BACKLIGHT_PIN    LCD_BACKLIGHT_PIN
297 298
 
298 299
   #define TOUCH_BUTTONS_HW_SPI
299 300
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          1
300 301
 
301
-  #define LCD_BACKLIGHT_PIN          EXP1_08_PIN
302 302
   #ifndef TFT_WIDTH
303 303
     #define TFT_WIDTH                        480
304 304
   #endif

+ 3
- 3
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_NANO_V3_common.h View File

@@ -283,16 +283,16 @@
283 283
   #define TFT_MISO_PIN               EXP2_10_PIN
284 284
   #define TFT_MOSI_PIN               EXP2_05_PIN
285 285
   #define TFT_DC_PIN                 EXP1_03_PIN
286
-  #define TFT_RST_PIN                EXP1_07_PIN
287 286
   #define TFT_A0_PIN                  TFT_DC_PIN
288 287
 
289 288
   #define TFT_RESET_PIN              EXP1_07_PIN
290
-  #define TFT_BACKLIGHT_PIN          EXP1_08_PIN
289
+
290
+  #define LCD_BACKLIGHT_PIN          EXP1_08_PIN
291
+  #define TFT_BACKLIGHT_PIN    LCD_BACKLIGHT_PIN
291 292
 
292 293
   #define TOUCH_BUTTONS_HW_SPI
293 294
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          1
294 295
 
295
-  #define LCD_BACKLIGHT_PIN          EXP1_08_PIN
296 296
   #ifndef TFT_WIDTH
297 297
     #define TFT_WIDTH                        480
298 298
   #endif

+ 2
- 3
Marlin/src/pins/stm32f4/pins_MKS_ROBIN_PRO_V2.h View File

@@ -305,16 +305,15 @@
305 305
   #define TFT_MISO_PIN               EXP2_10_PIN
306 306
   #define TFT_MOSI_PIN               EXP2_05_PIN
307 307
   #define TFT_DC_PIN                 EXP1_03_PIN
308
-  #define TFT_RST_PIN                EXP1_07_PIN
309 308
   #define TFT_A0_PIN                  TFT_DC_PIN
310 309
 
311 310
   #define TFT_RESET_PIN              EXP1_07_PIN
312
-  #define TFT_BACKLIGHT_PIN          EXP1_08_PIN
311
+  #define LCD_BACKLIGHT_PIN          EXP1_08_PIN
312
+  #define TFT_BACKLIGHT_PIN    LCD_BACKLIGHT_PIN
313 313
 
314 314
   #define TOUCH_BUTTONS_HW_SPI
315 315
   #define TOUCH_BUTTONS_HW_SPI_DEVICE          1
316 316
 
317
-  #define LCD_BACKLIGHT_PIN          EXP1_08_PIN
318 317
   #ifndef TFT_WIDTH
319 318
     #define TFT_WIDTH                        480
320 319
   #endif

+ 46
- 12
Marlin/src/pins/stm32f4/pins_VAKE403D.h View File

@@ -161,27 +161,61 @@
161 161
 #define POWER_LOSS_PIN                      PA4   // ?? Power loss / nAC_FAULT
162 162
 
163 163
 #if ENABLED(SDSUPPORT)
164
-  #define SD_DETECT_PIN                     PB7
165
-  #define SD_SS_PIN                        PB_15  // USD_CS -> CS for onboard SD
164
+  #define SD_DETECT_PIN              EXP2_04_PIN
165
+  #define SD_SS_PIN                         PB15  // USD_CS -> CS for onboard SD
166 166
 #endif
167 167
 
168
+/**
169
+ *        ------                  ------
170
+ *   PC9 |10  9 | PB12         ? |10  9 | ?
171
+ *   PD7 | 8  7 | PC12       PD6 | 8  7 | ?
172
+ *   PD1 | 6  5   PD2        PD0 | 6  5   ?
173
+ *   PD3 | 4  3 | PD4        PB7 | 4  3 | RESET
174
+ *   GND | 2  1 | 5V         GND | 2  1 | 3.3V
175
+ *        ------                  ------
176
+ *         EXP1                    EXP2
177
+ */
178
+#define EXP1_03_PIN                         PD4
179
+#define EXP1_04_PIN                         PD3
180
+#define EXP1_05_PIN                         PD2
181
+#define EXP1_06_PIN                         PD1
182
+#define EXP1_07_PIN                         PC12
183
+#define EXP1_08_PIN                         PD7
184
+#define EXP1_09_PIN                         PB12
185
+#define EXP1_10_PIN                         PC9
186
+
187
+#define EXP2_03_PIN                         -1
188
+#define EXP2_04_PIN                         PB7
189
+//#define EXP2_05_PIN                       ?
190
+#define EXP2_06_PIN                         PD0
191
+//#define EXP2_07_PIN                       ?
192
+#define EXP2_08_PIN                         PD6
193
+//#define EXP2_09_PIN                       ?
194
+//#define EXP2_10_PIN                       ?
195
+
168 196
 //
169 197
 // LCD / Controller
170 198
 //
171 199
 #if HAS_WIRED_LCD
200
+
172 201
   #if ENABLED(SDSUPPORT)
173 202
     #define SDSS                            PB6   // CS for SD card in LCD
174 203
   #endif
175
-  #define BEEPER_PIN                        PC9
176
-  #define LCD_PINS_RS                       PC12
177
-  #define LCD_PINS_ENABLE                   PD7
178
-  #define LCD_PINS_D4                       PD1
179
-  #define LCD_PINS_D5                       PD2
180
-  #define LCD_PINS_D6                       PD3
181
-  #define LCD_PINS_D7                       PD4
182
-  #define BTN_EN1                           PD6
183
-  #define BTN_EN2                           PD0
184
-  #define BTN_ENC                           PB12
204
+
205
+  #define BEEPER_PIN                 EXP1_10_PIN
206
+
207
+  #define BTN_EN1                    EXP2_08_PIN
208
+  #define BTN_EN2                    EXP2_06_PIN
209
+  #define BTN_ENC                    EXP1_09_PIN
210
+
211
+  #define LCD_PINS_ENABLE            EXP1_08_PIN
212
+  #define LCD_PINS_RS                EXP1_07_PIN
213
+
214
+  #define LCD_PINS_D4                EXP1_06_PIN
215
+  #define LCD_PINS_D5                EXP1_05_PIN
216
+  #define LCD_PINS_D6                EXP1_04_PIN
217
+  #define LCD_PINS_D7                EXP1_03_PIN
218
+
185 219
 #endif
186 220
 
187 221
 // Alter timing for graphical display

+ 0
- 2
Marlin/src/pins/stm32h7/pins_BTT_SKR_SE_BX.h View File

@@ -50,8 +50,6 @@
50 50
 #define LED_PIN                             PA13
51 51
 #define BEEPER_PIN                          PA14
52 52
 
53
-#define TFT_BACKLIGHT_PIN                   PB5
54
-
55 53
 #define POWER_MONITOR_PIN                   PB0
56 54
 #define RPI_POWER_PIN                       PE5
57 55
 

Loading…
Cancel
Save