ソースを参照

TFT SPI for BTT SKR v1.3 (#21794)

Luu Lac 4年前
コミット
64ad96e19e
コミッターのメールアドレスに関連付けられたアカウントが存在しません
2個のファイルの変更68行の追加5行の削除
  1. 68
    1
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h
  2. 0
    4
      Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h

+ 68
- 1
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_3.h ファイルの表示

@@ -267,8 +267,75 @@
267 267
 
268 268
     #error "ADC BUTTONS do not work unmodifed on SKR 1.3, The ADC ports cannot take more than 3.3v."
269 269
 
270
-  #elif IS_TFTGLCD_PANEL
270
+  #elif HAS_SPI_TFT                               // Config for Classic UI (emulated DOGM) and Color UI
271
+
272
+    #define TFT_A0_PIN               EXP1_03_PIN
273
+    #define TFT_DC_PIN               EXP1_03_PIN
274
+    #define TFT_CS_PIN               EXP1_04_PIN
275
+    #define TFT_RESET_PIN            EXP1_07_PIN
276
+    #define TFT_BACKLIGHT_PIN        EXP1_08_PIN
277
+
278
+    #define TFT_RST_PIN              EXP2_04_PIN
279
+    #define TFT_MOSI_PIN             EXP2_05_PIN
280
+    #define TFT_SCK_PIN              EXP2_09_PIN
281
+    #define TFT_MISO_PIN             EXP2_10_PIN
282
+
283
+    #define TOUCH_INT_PIN            EXP1_05_PIN
284
+    #define TOUCH_CS_PIN             EXP1_06_PIN
285
+
286
+    #define TOUCH_MOSI_PIN           EXP2_05_PIN
287
+    #define TOUCH_SCK_PIN            EXP2_09_PIN
288
+    #define TOUCH_MISO_PIN           EXP2_10_PIN
289
+
290
+    #define BTN_EN2                  EXP2_06_PIN
291
+    #define BTN_EN1                  EXP2_08_PIN
292
+    #define BTN_ENC                  EXP1_09_PIN
293
+
294
+    #define TOUCH_BUTTONS_HW_SPI
295
+    #define TOUCH_BUTTONS_HW_SPI_DEVICE        1
296
+
297
+    #define TFT_BUFFER_SIZE                 2400
298
+
299
+    #ifndef TFT_WIDTH
300
+      #define TFT_WIDTH                      480
301
+    #endif
302
+    #ifndef TFT_HEIGHT
303
+      #define TFT_HEIGHT                     320
304
+    #endif
305
+
306
+    #define LCD_READ_ID                     0xD3
307
+    #define LCD_USE_DMA_SPI
271 308
 
309
+    #if ENABLED(TFT_CLASSIC_UI)
310
+      #ifndef TOUCH_CALIBRATION_X
311
+        #define TOUCH_CALIBRATION_X       -11386
312
+      #endif
313
+      #ifndef TOUCH_CALIBRATION_Y
314
+        #define TOUCH_CALIBRATION_Y         8684
315
+      #endif
316
+      #ifndef TOUCH_OFFSET_X
317
+        #define TOUCH_OFFSET_X               689
318
+      #endif
319
+      #ifndef TOUCH_OFFSET_Y
320
+        #define TOUCH_OFFSET_Y              -273
321
+      #endif
322
+    #elif ENABLED(TFT_COLOR_UI)
323
+      #ifndef TOUCH_CALIBRATION_X
324
+        #define TOUCH_CALIBRATION_X       -16741
325
+      #endif
326
+      #ifndef TOUCH_CALIBRATION_Y
327
+        #define TOUCH_CALIBRATION_Y        11258
328
+      #endif
329
+      #ifndef TOUCH_OFFSET_X
330
+        #define TOUCH_OFFSET_X              1024
331
+      #endif
332
+      #ifndef TOUCH_OFFSET_Y
333
+        #define TOUCH_OFFSET_Y              -367
334
+      #endif
335
+      #define TFT_BUFFER_SIZE               2400
336
+    #endif
337
+
338
+  #elif IS_TFTGLCD_PANEL
272 339
     #if ENABLED(TFTGLCD_PANEL_SPI)
273 340
       #define TFTGLCD_CS             EXP2_08_PIN
274 341
     #endif

+ 0
- 4
Marlin/src/pins/lpc1768/pins_BTT_SKR_V1_4.h ファイルの表示

@@ -402,10 +402,6 @@
402 402
     #define SD_MISO_PIN              EXP2_10_PIN
403 403
     #define SD_MOSI_PIN              EXP2_05_PIN
404 404
 
405
-    // Disable any LCD related PINs config
406
-    #define LCD_PINS_ENABLE                -1
407
-    #define LCD_PINS_RS                    -1
408
-
409 405
     #define TFT_BUFFER_SIZE                 2400
410 406
 
411 407
   #elif IS_TFTGLCD_PANEL

読み込み中…
キャンセル
保存