Просмотр исходного кода

BTT002 pins for FYSETC mini12864 (#21096)

Allen Bauer 3 лет назад
Родитель
Сommit
f298cde47e
Аккаунт пользователя с таким Email не найден
1 измененных файлов: 87 добавлений и 39 удалений
  1. 87
    39
      Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h

+ 87
- 39
Marlin/src/pins/stm32f4/pins_BTT_BTT002_V1_0.h Просмотреть файл

@@ -172,73 +172,121 @@
172 172
 #define FAN_PIN                             PB8   // Fan1
173 173
 #define FAN1_PIN                            PB9   // Fan0
174 174
 
175
+/**
176
+ * -----------------------------------BTT002 V1.0----------------------------------------
177
+ *               ------                                          ------                  |
178
+ *          PA3 | 1  2 | GND                                 5V | 1  2 | GND             |
179
+ *       NRESET | 3  4 | PC4 (SD_DET)             (LCD_D7) PE13 | 3  4 | PE12  (LCD_D6)  |
180
+ *   (MOSI) PA7 | 5  6 | PB0 (BTN_EN2)            (LCD_D5) PE11 | 5  6 | PE10  (LCD_D4)  |
181
+ *  (SD_SS) PA4 | 7  8 | PC5 (BTN_EN1)            (LCD_RS) PE8  | 7  8 | PE9   (LCD_EN)  |
182
+ *    (SCK) PA5 | 9 10 | PA6 (MISO)              (BTN_ENC) PB1  | 9 10 | PE7   (BEEPER)  |
183
+ *               ------                                          ------                  |
184
+ *                EXP2                                            EXP1                   |
185
+ * --------------------------------------------------------------------------------------
186
+ */
187
+
188
+#define EXP1_03_PIN                         PE13
189
+#define EXP1_04_PIN                         PE12
190
+#define EXP1_05_PIN                         PE11
191
+#define EXP1_06_PIN                         PE10
192
+#define EXP1_07_PIN                         PE8
193
+#define EXP1_08_PIN                         PE9
194
+#define EXP1_09_PIN                         PB1
195
+#define EXP1_10_PIN                         PE7
196
+
197
+#define EXP2_03_PIN                         -1
198
+#define EXP2_04_PIN                         PC4
199
+#define EXP2_05_PIN                         PA7
200
+#define EXP2_06_PIN                         PB0
201
+#define EXP2_07_PIN                         PA4
202
+#define EXP2_08_PIN                         PC5
203
+#define EXP2_09_PIN                         PA5
204
+#define EXP2_10_PIN                         PA6
205
+
175 206
 // HAL SPI1 pins
176 207
 #define CUSTOM_SPI_PINS
177 208
 #if ENABLED(CUSTOM_SPI_PINS)
178
-  #define SD_SCK_PIN                        PA5   // SPI1 SCLK
179
-  #define SD_SS_PIN                         PA4   // SPI1 SSEL
180
-  #define SD_MISO_PIN                       PA6   // SPI1 MISO
181
-  #define SD_MOSI_PIN                       PA7   // SPI1 MOSI
209
+  #define SD_SCK_PIN                 EXP2_09_PIN  // SPI1 SCLK
210
+  #define SD_SS_PIN                  EXP2_07_PIN  // SPI1 SSEL
211
+  #define SD_MISO_PIN                EXP2_10_PIN  // SPI1 MISO
212
+  #define SD_MOSI_PIN                EXP2_05_PIN  // SPI1 MOSI
182 213
 #endif
183 214
 
184
-//
185
-// Misc. Functions
186
-//
187
-#define SDSS                                PA4
188
-
189
-/**
190
- * -------------------------------------BTT002 V1.0--------------------------------------------
191
- *               -----                                             -----                      |
192
- *          PA3 | · · | GND                                    5V | · · | GND                 |
193
- *       NRESET | · · | PC4(SD_DET)                 (LCD_D7) PE13 | · · | PE12  (LCD_D6)      |
194
- *   (MOSI)PA7  | · · | PB0(BTN_EN2)                (LCD_D5) PE11 | · · | PE10  (LCD_D4)      |
195
- *  (SD_SS)PA4  | · · | PC5(BTN_EN1)                (LCD_RS) PE8  | · · | PE9   (LCD_EN)      |
196
- *    (SCK)PA5  | · · | PA6(MISO)                  (BTN_ENC) PB1  | · · | PE7   (BEEPER)      |
197
- *               -----                                             -----                      |
198
- *               EXP2                                              EXP1                       |
199
- * --------------------------------------------------------------------------------------------
200
- */
215
+#define SDSS                         EXP2_07_PIN
201 216
 
202 217
 //
203 218
 // LCDs and Controllers
204 219
 //
205 220
 #if HAS_WIRED_LCD
206
-  #define BEEPER_PIN                        PE7
207
-  #define BTN_ENC                           PB1
221
+  #define BEEPER_PIN                 EXP1_10_PIN
222
+  #define BTN_ENC                    EXP1_09_PIN
223
+
224
+  #define SD_DETECT_PIN              EXP2_04_PIN
208 225
 
209 226
   #if ENABLED(CR10_STOCKDISPLAY)
210
-    #define LCD_PINS_RS                     PE12
227
+    #define LCD_PINS_RS              EXP1_04_PIN
228
+
229
+    #define BTN_EN1                  EXP1_08_PIN
230
+    #define BTN_EN2                  EXP1_06_PIN
231
+
232
+    #define LCD_PINS_ENABLE          EXP1_03_PIN
233
+    #define LCD_PINS_D4              EXP1_05_PIN
211 234
 
212
-    #define BTN_EN1                         PE9
213
-    #define BTN_EN2                         PE10
235
+  #elif ENABLED(MKS_MINI_12864)
214 236
 
215
-    #define LCD_PINS_ENABLE                 PE13
216
-    #define LCD_PINS_D4                     PE11
237
+    #define DOGLCD_A0                EXP1_04_PIN
238
+    #define DOGLCD_CS                EXP1_05_PIN
239
+    #define BTN_EN1                  EXP2_08_PIN
240
+    #define BTN_EN2                  EXP2_06_PIN
217 241
 
218 242
   #else
219 243
 
220
-    #define LCD_PINS_RS                     PE8
244
+    #define LCD_PINS_RS              EXP1_07_PIN
245
+
246
+    #define BTN_EN1                  EXP2_08_PIN
247
+    #define BTN_EN2                  EXP2_06_PIN
248
+
249
+    #define LCD_PINS_ENABLE          EXP1_08_PIN
250
+    #define LCD_PINS_D4              EXP1_06_PIN
221 251
 
222
-    #define BTN_EN1                         PC5
223
-    #define BTN_EN2                         PB0
224
-    #define SD_DETECT_PIN                   PC4
252
+    #if ENABLED(FYSETC_MINI_12864)
253
+      #define DOGLCD_CS              EXP1_08_PIN
254
+      #define DOGLCD_A0              EXP1_07_PIN
255
+      #define DOGLCD_MOSI            EXP2_05_PIN
256
+      #define DOGLCD_MISO            EXP2_10_PIN
257
+      #define DOGLCD_SCK             EXP2_09_PIN
225 258
 
226
-    #define LCD_SDSS                        PA4
259
+      #define LCD_BACKLIGHT_PIN             -1
227 260
 
228
-    #define LCD_PINS_ENABLE                 PE9
229
-    #define LCD_PINS_D4                     PE10
261
+      #define FORCE_SOFT_SPI
262
+
263
+      #define LCD_RESET_PIN          EXP1_06_PIN  // Must be high or open for LCD to operate normally.
264
+
265
+      #if EITHER(FYSETC_MINI_12864_1_2, FYSETC_MINI_12864_2_0)
266
+        #ifndef RGB_LED_R_PIN
267
+          #define RGB_LED_R_PIN      EXP1_05_PIN
268
+        #endif
269
+        #ifndef RGB_LED_G_PIN
270
+          #define RGB_LED_G_PIN      EXP1_04_PIN
271
+        #endif
272
+        #ifndef RGB_LED_B_PIN
273
+          #define RGB_LED_B_PIN      EXP1_03_PIN
274
+        #endif
275
+      #elif ENABLED(FYSETC_MINI_12864_2_1)
276
+        #define NEOPIXEL_PIN         EXP1_05_PIN
277
+      #endif
278
+    #endif // !FYSETC_MINI_12864
230 279
 
231 280
     #if IS_ULTIPANEL
232
-      #define LCD_PINS_D5                   PE11
233
-      #define LCD_PINS_D6                   PE12
234
-      #define LCD_PINS_D7                   PE13
281
+      #define LCD_PINS_D5            EXP1_05_PIN
282
+      #define LCD_PINS_D6            EXP1_04_PIN
283
+      #define LCD_PINS_D7            EXP1_03_PIN
235 284
 
236 285
       #if ENABLED(REPRAP_DISCOUNT_FULL_GRAPHIC_SMART_CONTROLLER)
237 286
         #define BTN_ENC_EN           LCD_PINS_D7  // Detect the presence of the encoder
238 287
       #endif
239 288
 
240 289
     #endif
241
-
242 290
   #endif
243 291
 
244 292
   // Alter timing for graphical display

Загрузка…
Отмена
Сохранить