|
@@ -185,97 +185,125 @@
|
185
|
185
|
#define FAN2_PIN PB2
|
186
|
186
|
|
187
|
187
|
//
|
188
|
|
-// SPI
|
189
|
|
-//
|
190
|
|
-#define SD_SCK_PIN PA5
|
191
|
|
-#define SD_MISO_PIN PA6
|
192
|
|
-#define SD_MOSI_PIN PA7
|
193
|
|
-
|
194
|
|
-//
|
195
|
188
|
// Misc. Functions
|
196
|
189
|
//
|
197
|
190
|
//#define LED_PIN PB14
|
198
|
191
|
//#define PS_ON_PIN PE11
|
199
|
192
|
//#define KILL_PIN PC5
|
200
|
193
|
|
201
|
|
-#define SDSS PA4
|
202
|
|
-#define SD_DETECT_PIN PB10
|
|
194
|
+/**
|
|
195
|
+ * ______ ______
|
|
196
|
+ * 5V | 1 2 | GND 5V | 1 2 | GND
|
|
197
|
+ * PD1 | 3 4 | PD0 RESET | 3 4 | PB10
|
|
198
|
+ * PC12 | 5 6 PC10 PA7 | 5 6 PC7
|
|
199
|
+ * PD2 | 7 8 | PC11 PA4 | 7 8 | PC6
|
|
200
|
+ * PA8 | 9 10 | PC9 PA5 | 9 10 | PA6
|
|
201
|
+ * ------ ------
|
|
202
|
+ * EXP1 EXP2
|
|
203
|
+ */
|
|
204
|
+#define EXP1_03_PIN PD1
|
|
205
|
+#define EXP1_04_PIN PD0
|
|
206
|
+#define EXP1_05_PIN PC12
|
|
207
|
+#define EXP1_06_PIN PC10
|
|
208
|
+#define EXP1_07_PIN PD2
|
|
209
|
+#define EXP1_08_PIN PC11
|
|
210
|
+#define EXP1_09_PIN PA8
|
|
211
|
+#define EXP1_10_PIN PC9
|
|
212
|
+
|
|
213
|
+#define EXP2_03_PIN -1 // RESET
|
|
214
|
+#define EXP2_04_PIN PB10
|
|
215
|
+#define EXP2_05_PIN PA7
|
|
216
|
+#define EXP2_06_PIN PC7
|
|
217
|
+#define EXP2_07_PIN PA4
|
|
218
|
+#define EXP2_08_PIN PC6
|
|
219
|
+#define EXP2_09_PIN PA5
|
|
220
|
+#define EXP2_10_PIN PA6
|
|
221
|
+
|
|
222
|
+//
|
|
223
|
+// SPI / SD Card
|
|
224
|
+//
|
|
225
|
+#define SD_SCK_PIN EXP2_09_PIN
|
|
226
|
+#define SD_MISO_PIN EXP2_10_PIN
|
|
227
|
+#define SD_MOSI_PIN EXP2_05_PIN
|
|
228
|
+
|
|
229
|
+#define SDSS EXP2_07_PIN
|
|
230
|
+#define SD_DETECT_PIN EXP2_04_PIN
|
203
|
231
|
|
204
|
232
|
//
|
205
|
233
|
// LCD / Controller
|
206
|
234
|
//
|
207
|
235
|
#if ENABLED(FYSETC_242_OLED_12864)
|
208
|
236
|
|
209
|
|
- #define BTN_EN1 PC9
|
210
|
|
- #define BTN_EN2 PD1
|
211
|
|
- #define BTN_ENC PA8
|
|
237
|
+ #define BTN_EN1 EXP1_10_PIN
|
|
238
|
+ #define BTN_EN2 EXP1_03_PIN
|
|
239
|
+ #define BTN_ENC EXP1_09_PIN
|
212
|
240
|
|
213
|
|
- #define BEEPER_PIN PC6
|
|
241
|
+ #define BEEPER_PIN EXP2_08_PIN
|
214
|
242
|
|
215
|
|
- #define LCD_PINS_DC PC12
|
216
|
|
- #define LCD_PINS_RS PC7 // LCD_RST
|
217
|
|
- #define DOGLCD_CS PD2
|
218
|
|
- #define DOGLCD_MOSI PC10
|
219
|
|
- #define DOGLCD_SCK PC11
|
|
243
|
+ #define LCD_PINS_DC EXP1_05_PIN
|
|
244
|
+ #define LCD_PINS_RS EXP2_06_PIN // LCD_RST
|
|
245
|
+ #define DOGLCD_CS EXP1_07_PIN
|
|
246
|
+ #define DOGLCD_MOSI EXP1_06_PIN
|
|
247
|
+ #define DOGLCD_SCK EXP1_08_PIN
|
220
|
248
|
#define DOGLCD_A0 LCD_PINS_DC
|
221
|
249
|
#define FORCE_SOFT_SPI
|
222
|
250
|
|
223
|
251
|
#define KILL_PIN -1 // NC
|
224
|
|
- #define NEOPIXEL_PIN PD0
|
|
252
|
+ #define NEOPIXEL_PIN EXP1_04_PIN
|
225
|
253
|
|
226
|
254
|
#elif HAS_WIRED_LCD
|
227
|
255
|
|
228
|
|
- #define BEEPER_PIN PC9
|
229
|
|
- #define BTN_ENC PA8
|
|
256
|
+ #define BEEPER_PIN EXP1_10_PIN
|
|
257
|
+ #define BTN_ENC EXP1_09_PIN
|
230
|
258
|
|
231
|
259
|
#if ENABLED(CR10_STOCKDISPLAY)
|
232
|
|
- #define LCD_PINS_RS PD0
|
|
260
|
+ #define LCD_PINS_RS EXP1_04_PIN
|
233
|
261
|
|
234
|
|
- #define BTN_EN1 PC11
|
235
|
|
- #define BTN_EN2 PC10
|
|
262
|
+ #define BTN_EN1 EXP1_08_PIN
|
|
263
|
+ #define BTN_EN2 EXP1_06_PIN
|
236
|
264
|
|
237
|
|
- #define LCD_PINS_ENABLE PD1
|
238
|
|
- #define LCD_PINS_D4 PC12
|
|
265
|
+ #define LCD_PINS_ENABLE EXP1_03_PIN
|
|
266
|
+ #define LCD_PINS_D4 EXP1_05_PIN
|
239
|
267
|
|
240
|
268
|
#else
|
241
|
269
|
|
242
|
|
- #define LCD_PINS_RS PD2
|
|
270
|
+ #define LCD_PINS_RS EXP1_07_PIN
|
243
|
271
|
|
244
|
|
- #define BTN_EN1 PC6
|
245
|
|
- #define BTN_EN2 PC7
|
|
272
|
+ #define BTN_EN1 EXP2_08_PIN
|
|
273
|
+ #define BTN_EN2 EXP2_06_PIN
|
246
|
274
|
|
247
|
|
- #define LCD_SDSS PA4
|
|
275
|
+ #define LCD_SDSS EXP2_07_PIN
|
248
|
276
|
|
249
|
|
- #define LCD_PINS_ENABLE PC11
|
250
|
|
- #define LCD_PINS_D4 PC10
|
|
277
|
+ #define LCD_PINS_ENABLE EXP1_08_PIN
|
|
278
|
+ #define LCD_PINS_D4 EXP1_06_PIN
|
251
|
279
|
|
252
|
280
|
#if ENABLED(FYSETC_MINI_12864)
|
253
|
281
|
// See https://wiki.fysetc.com/Mini12864_Panel
|
254
|
|
- #define DOGLCD_CS PC11
|
255
|
|
- #define DOGLCD_A0 PD2
|
|
282
|
+ #define DOGLCD_CS EXP1_08_PIN
|
|
283
|
+ #define DOGLCD_A0 EXP1_07_PIN
|
256
|
284
|
#if ENABLED(FYSETC_GENERIC_12864_1_1)
|
257
|
|
- #define LCD_BACKLIGHT_PIN PD0
|
|
285
|
+ #define LCD_BACKLIGHT_PIN EXP1_04_PIN
|
258
|
286
|
#endif
|
259
|
|
- #define LCD_RESET_PIN PC10 // Must be high or open for LCD to operate normally.
|
|
287
|
+ #define LCD_RESET_PIN EXP1_06_PIN // Must be high or open for LCD to operate normally.
|
260
|
288
|
#if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
|
261
|
289
|
#ifndef RGB_LED_R_PIN
|
262
|
|
- #define RGB_LED_R_PIN PC12
|
|
290
|
+ #define RGB_LED_R_PIN EXP1_05_PIN
|
263
|
291
|
#endif
|
264
|
292
|
#ifndef RGB_LED_G_PIN
|
265
|
|
- #define RGB_LED_G_PIN PD0
|
|
293
|
+ #define RGB_LED_G_PIN EXP1_04_PIN
|
266
|
294
|
#endif
|
267
|
295
|
#ifndef RGB_LED_B_PIN
|
268
|
|
- #define RGB_LED_B_PIN PD1
|
|
296
|
+ #define RGB_LED_B_PIN EXP1_03_PIN
|
269
|
297
|
#endif
|
270
|
298
|
#elif ENABLED(FYSETC_MINI_12864_2_1)
|
271
|
|
- #define NEOPIXEL_PIN PC12
|
|
299
|
+ #define NEOPIXEL_PIN EXP1_05_PIN
|
272
|
300
|
#endif
|
273
|
301
|
#endif
|
274
|
302
|
|
275
|
303
|
#if IS_ULTIPANEL
|
276
|
|
- #define LCD_PINS_D5 PC12
|
277
|
|
- #define LCD_PINS_D6 PD0
|
278
|
|
- #define LCD_PINS_D7 PD1
|
|
304
|
+ #define LCD_PINS_D5 EXP1_05_PIN
|
|
305
|
+ #define LCD_PINS_D6 EXP1_04_PIN
|
|
306
|
+ #define LCD_PINS_D7 EXP1_03_PIN
|
279
|
307
|
#if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
|
280
|
308
|
#define BTN_ENC_EN LCD_PINS_D7 // Detect the presence of the encoder
|
281
|
309
|
#endif
|
|
@@ -287,15 +315,9 @@
|
287
|
315
|
|
288
|
316
|
// Alter timing for graphical display
|
289
|
317
|
#if HAS_MARLINUI_U8GLIB
|
290
|
|
- #ifndef BOARD_ST7920_DELAY_1
|
291
|
|
- #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
292
|
|
- #endif
|
293
|
|
- #ifndef BOARD_ST7920_DELAY_2
|
294
|
|
- #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
295
|
|
- #endif
|
296
|
|
- #ifndef BOARD_ST7920_DELAY_3
|
297
|
|
- #define BOARD_ST7920_DELAY_3 DELAY_NS(640)
|
298
|
|
- #endif
|
|
318
|
+ #define BOARD_ST7920_DELAY_1 DELAY_NS(96)
|
|
319
|
+ #define BOARD_ST7920_DELAY_2 DELAY_NS(48)
|
|
320
|
+ #define BOARD_ST7920_DELAY_3 DELAY_NS(640)
|
299
|
321
|
#endif
|
300
|
322
|
|
301
|
323
|
#ifndef RGB_LED_R_PIN
|