Add parentheses to SD macros
This commit is contained in:
@ -244,16 +244,16 @@ private:
|
||||
};
|
||||
|
||||
#if ENABLED(USB_FLASH_DRIVE_SUPPORT)
|
||||
#define IS_SD_INSERTED Sd2Card::isInserted()
|
||||
#define IS_SD_INSERTED() Sd2Card::isInserted()
|
||||
#elif PIN_EXISTS(SD_DETECT)
|
||||
#if ENABLED(SD_DETECT_INVERTED)
|
||||
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) == HIGH)
|
||||
#define IS_SD_INSERTED() (READ(SD_DETECT_PIN) == HIGH)
|
||||
#else
|
||||
#define IS_SD_INSERTED (READ(SD_DETECT_PIN) == LOW)
|
||||
#define IS_SD_INSERTED() (READ(SD_DETECT_PIN) == LOW)
|
||||
#endif
|
||||
#else
|
||||
// No card detect line? Assume the card is inserted.
|
||||
#define IS_SD_INSERTED true
|
||||
#define IS_SD_INSERTED() true
|
||||
#endif
|
||||
|
||||
extern CardReader card;
|
||||
@ -261,11 +261,11 @@ extern CardReader card;
|
||||
#endif // SDSUPPORT
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
#define IS_SD_PRINTING (card.sdprinting)
|
||||
#define IS_SD_FILE_OPEN (card.isFileOpen())
|
||||
#define IS_SD_PRINTING() card.sdprinting
|
||||
#define IS_SD_FILE_OPEN() card.isFileOpen()
|
||||
#else
|
||||
#define IS_SD_PRINTING (false)
|
||||
#define IS_SD_FILE_OPEN (false)
|
||||
#define IS_SD_PRINTING() false
|
||||
#define IS_SD_FILE_OPEN() false
|
||||
#endif
|
||||
|
||||
#endif // _CARDREADER_H_
|
||||
|
Reference in New Issue
Block a user