Add parentheses to SD macros

This commit is contained in:
Scott Lahteine
2018-10-19 13:52:44 -05:00
parent aa9202260d
commit c6a5c74208
11 changed files with 27 additions and 27 deletions

View File

@ -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_