Browse Source

Fix MKS SGen-L SD detect pin (#16224)

thisiskeithb 4 years ago
parent
commit
dc8d8cb39c
1 changed files with 6 additions and 8 deletions
  1. 6
    8
      Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h

+ 6
- 8
Marlin/src/pins/lpc1768/pins_MKS_SGEN_L.h View File

208
     #define BTN_EN2        P3_26
208
     #define BTN_EN2        P3_26
209
 
209
 
210
     #define LCD_SDSS       P0_28
210
     #define LCD_SDSS       P0_28
211
-    #define SD_DETECT_PIN  P0_27
212
 
211
 
213
     #if ENABLED(MKS_12864OLED_SSD1306)
212
     #if ENABLED(MKS_12864OLED_SSD1306)
214
 
213
 
284
 
283
 
285
 #define ONBOARD_SD_CS_PIN  P0_06   // Chip select for "System" SD card
284
 #define ONBOARD_SD_CS_PIN  P0_06   // Chip select for "System" SD card
286
 
285
 
287
-#if SD_CONNECTION_IS(LCD)
288
-  #define SCK_PIN          P0_07
289
-  #define MISO_PIN         P0_08
290
-  #define MOSI_PIN         P0_09
291
-  #define SS_PIN           P0_28
292
-#elif SD_CONNECTION_IS(ONBOARD)
286
+#if SD_CONNECTION_IS(LCD) || SD_CONNECTION_IS(ONBOARD)
293
   #define SD_DETECT_PIN    P0_27
287
   #define SD_DETECT_PIN    P0_27
294
   #define SCK_PIN          P0_07
288
   #define SCK_PIN          P0_07
295
   #define MISO_PIN         P0_08
289
   #define MISO_PIN         P0_08
296
   #define MOSI_PIN         P0_09
290
   #define MOSI_PIN         P0_09
297
-  #define SS_PIN           ONBOARD_SD_CS_PIN
291
+  #if SD_CONNECTION_IS(ONBOARD)
292
+    #define SS_PIN         ONBOARD_SD_CS_PIN
293
+  #else
294
+    #define SS_PIN         P0_28
295
+  #endif
298
 #elif SD_CONNECTION_IS(CUSTOM_CABLE)
296
 #elif SD_CONNECTION_IS(CUSTOM_CABLE)
299
   #error "No custom SD drive cable defined for this board."
297
   #error "No custom SD drive cable defined for this board."
300
 #endif
298
 #endif

Loading…
Cancel
Save