NO_SD_DETECT option (#20741)

This commit is contained in:
Victor Oliveira 2021-01-11 00:55:16 -03:00 committed by GitHub
parent 9eecb2f542
commit d6de6de1bb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

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

View File

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