Browse Source

Tweak IS_SD_INSERTED

Scott Lahteine 6 years ago
parent
commit
d26d9d5b81
1 changed files with 2 additions and 2 deletions
  1. 2
    2
      Marlin/src/sd/cardreader.h

+ 2
- 2
Marlin/src/sd/cardreader.h View File

247
   #define IS_SD_INSERTED() Sd2Card::isInserted()
247
   #define IS_SD_INSERTED() Sd2Card::isInserted()
248
 #elif PIN_EXISTS(SD_DETECT)
248
 #elif PIN_EXISTS(SD_DETECT)
249
   #if ENABLED(SD_DETECT_INVERTED)
249
   #if ENABLED(SD_DETECT_INVERTED)
250
-    #define IS_SD_INSERTED() (READ(SD_DETECT_PIN) == HIGH)
250
+    #define IS_SD_INSERTED()  READ(SD_DETECT_PIN)
251
   #else
251
   #else
252
-    #define IS_SD_INSERTED() (READ(SD_DETECT_PIN) == LOW)
252
+    #define IS_SD_INSERTED() !READ(SD_DETECT_PIN)
253
   #endif
253
   #endif
254
 #else
254
 #else
255
   // No card detect line? Assume the card is inserted.
255
   // No card detect line? Assume the card is inserted.

Loading…
Cancel
Save