Browse Source

NO_SD_DETECT option (#20741)

Victor Oliveira 3 years ago
parent
commit
d6de6de1bb
No account linked to committer's email address
2 changed files with 9 additions and 1 deletions
  1. 4
    1
      Marlin/Configuration_adv.h
  2. 5
    0
      Marlin/src/inc/Conditionals_post.h

+ 4
- 1
Marlin/Configuration_adv.h View File

@@ -1388,13 +1388,16 @@
1388 1388
    * Set this option to one of the following (or the board's defaults apply):
1389 1389
    *
1390 1390
    *           LCD - Use the SD drive in the external LCD controller.
1391
-   *       ONBOARD - Use the SD drive on the control board. (No SD_DETECT_PIN. M21 to init.)
1391
+   *       ONBOARD - Use the SD drive on the control board.
1392 1392
    *  CUSTOM_CABLE - Use a custom cable to access the SD (as defined in a pins file).
1393 1393
    *
1394 1394
    * :[ 'LCD', 'ONBOARD', 'CUSTOM_CABLE' ]
1395 1395
    */
1396 1396
   //#define SDCARD_CONNECTION LCD
1397 1397
 
1398
+  // Enable if SD detect is rendered useless (e.g., by using an SD extender)
1399
+  //#define NO_SD_DETECT
1400
+
1398 1401
 #endif // SDSUPPORT
1399 1402
 
1400 1403
 /**

+ 5
- 0
Marlin/src/inc/Conditionals_post.h View File

@@ -323,6 +323,11 @@
323 323
  */
324 324
 #if ENABLED(SDSUPPORT)
325 325
 
326
+  // Extender cable doesn't support SD_DETECT_PIN
327
+  #if ENABLED(NO_SD_DETECT)
328
+    #undef SD_DETECT_PIN
329
+  #endif
330
+
326 331
   #if HAS_SD_HOST_DRIVE && SD_CONNECTION_IS(ONBOARD)
327 332
     //
328 333
     // The external SD card is not used. Hardware SPI is used to access the card.

Loading…
Cancel
Save