diff --git a/Marlin/Sd2Card.cpp b/Marlin/Sd2Card.cpp
index f421154ea..884fa4553 100644
--- a/Marlin/Sd2Card.cpp
+++ b/Marlin/Sd2Card.cpp
@@ -18,6 +18,8 @@
* .
*/
#include "Marlin.h"
+
+#ifdef SDSUPPORT
#include "Sd2Card.h"
//------------------------------------------------------------------------------
#ifndef SOFTWARE_SPI
@@ -636,3 +638,6 @@ bool Sd2Card::writeStop() {
chipSelectHigh();
return false;
}
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/Sd2Card.h b/Marlin/Sd2Card.h
index 0e8b6665e..7de5f11bc 100644
--- a/Marlin/Sd2Card.h
+++ b/Marlin/Sd2Card.h
@@ -17,6 +17,10 @@
* along with the Arduino Sd2Card Library. If not, see
* .
*/
+
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#ifndef Sd2Card_h
#define Sd2Card_h
/**
@@ -232,3 +236,6 @@ class Sd2Card {
bool writeData(uint8_t token, const uint8_t* src);
};
#endif // Sd2Card_h
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/Sd2PinMap.h b/Marlin/Sd2PinMap.h
index 77a74987c..a40729df2 100644
--- a/Marlin/Sd2PinMap.h
+++ b/Marlin/Sd2PinMap.h
@@ -18,6 +18,9 @@
* .
*/
// Warning this file was generated by a program.
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#ifndef Sd2PinMap_h
#define Sd2PinMap_h
#include
@@ -360,3 +363,6 @@ static inline __attribute__((always_inline))
}
}
#endif // Sd2PinMap_h
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdBaseFile.cpp b/Marlin/SdBaseFile.cpp
index d33b1e038..f8dc83ade 100644
--- a/Marlin/SdBaseFile.cpp
+++ b/Marlin/SdBaseFile.cpp
@@ -19,6 +19,10 @@
*/
#define SERIAL MSerial
+
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#include "SdBaseFile.h"
//------------------------------------------------------------------------------
// pointer to cwd directory
@@ -1784,3 +1788,6 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
#if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0; // NOLINT
#endif // ALLOW_DEPRECATED_FUNCTIONS
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdBaseFile.h b/Marlin/SdBaseFile.h
index 80402e56c..1bf75f6f2 100644
--- a/Marlin/SdBaseFile.h
+++ b/Marlin/SdBaseFile.h
@@ -17,6 +17,9 @@
* along with the Arduino SdFat Library. If not, see
* .
*/
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#ifndef SdBaseFile_h
#define SdBaseFile_h
/**
@@ -477,3 +480,4 @@ class SdBaseFile {
};
#endif // SdBaseFile_h
+#endif
\ No newline at end of file
diff --git a/Marlin/SdFatConfig.h b/Marlin/SdFatConfig.h
index 036bdb9c6..2a78c2a85 100644
--- a/Marlin/SdFatConfig.h
+++ b/Marlin/SdFatConfig.h
@@ -21,6 +21,9 @@
* \file
* \brief configuration definitions
*/
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#ifndef SdFatConfig_h
#define SdFatConfig_h
#include
@@ -106,3 +109,6 @@ uint8_t const SOFT_SPI_SCK_PIN = 13;
*/
#define USE_CXA_PURE_VIRTUAL 1
#endif // SdFatConfig_h
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdFatStructs.h b/Marlin/SdFatStructs.h
index 4ea82b766..7ad88d67f 100644
--- a/Marlin/SdFatStructs.h
+++ b/Marlin/SdFatStructs.h
@@ -17,6 +17,9 @@
* along with the Arduino SdFat Library. If not, see
* .
*/
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#ifndef SdFatStructs_h
#define SdFatStructs_h
/**
@@ -602,3 +605,6 @@ static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
}
#endif // SdFatStructs_h
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdFatUtil.cpp b/Marlin/SdFatUtil.cpp
index 559305f11..ffbcba0c6 100644
--- a/Marlin/SdFatUtil.cpp
+++ b/Marlin/SdFatUtil.cpp
@@ -18,6 +18,8 @@
* .
*/
#include "Marlin.h"
+
+#ifdef SDSUPPORT
#include "SdFatUtil.h"
//------------------------------------------------------------------------------
@@ -74,3 +76,4 @@ void SdFatUtil::SerialPrint_P(PGM_P str) {
void SdFatUtil::SerialPrintln_P(PGM_P str) {
println_P( str);
}
+#endif
diff --git a/Marlin/SdFatUtil.h b/Marlin/SdFatUtil.h
index d843da04c..7f1809422 100644
--- a/Marlin/SdFatUtil.h
+++ b/Marlin/SdFatUtil.h
@@ -17,6 +17,9 @@
* along with the Arduino SdFat Library. If not, see
* .
*/
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#ifndef SdFatUtil_h
#define SdFatUtil_h
/**
@@ -40,3 +43,6 @@ namespace SdFatUtil {
using namespace SdFatUtil; // NOLINT
#endif // #define SdFatUtil_h
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdFile.cpp b/Marlin/SdFile.cpp
index eda85b3ea..e9439e3b5 100644
--- a/Marlin/SdFile.cpp
+++ b/Marlin/SdFile.cpp
@@ -18,6 +18,8 @@
* .
*/
#include "Marlin.h"
+
+#ifdef SDSUPPORT
#include "SdFile.h"
/** Create a file object and open it in the current working directory.
*
@@ -85,3 +87,6 @@ void SdFile::writeln_P(PGM_P str) {
write_P(str);
write_P(PSTR("\r\n"));
}
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdFile.h b/Marlin/SdFile.h
index a9efebc68..cbf1bbdbd 100644
--- a/Marlin/SdFile.h
+++ b/Marlin/SdFile.h
@@ -22,6 +22,8 @@
* \brief SdFile class
*/
#include "Marlin.h"
+
+#ifdef SDSUPPORT
#include "SdBaseFile.h"
#include
#ifndef SdFile_h
@@ -47,3 +49,6 @@ class SdFile : public SdBaseFile, public Print {
void writeln_P(PGM_P str);
};
#endif // SdFile_h
+
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdInfo.h b/Marlin/SdInfo.h
index 2a58eb7db..03ece1022 100644
--- a/Marlin/SdInfo.h
+++ b/Marlin/SdInfo.h
@@ -17,6 +17,9 @@
* along with the Arduino Sd2Card Library. If not, see
* .
*/
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#ifndef SdInfo_h
#define SdInfo_h
#include
@@ -273,3 +276,5 @@ union csd_t {
csd2_t v2;
};
#endif // SdInfo_h
+
+#endif
\ No newline at end of file
diff --git a/Marlin/SdVolume.cpp b/Marlin/SdVolume.cpp
index a14bb627e..f14d7bc70 100644
--- a/Marlin/SdVolume.cpp
+++ b/Marlin/SdVolume.cpp
@@ -17,6 +17,9 @@
* along with the Arduino SdFat Library. If not, see
* .
*/
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
#include "SdVolume.h"
//------------------------------------------------------------------------------
#if !USE_MULTIPLE_CARDS
@@ -399,3 +402,4 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
fail:
return false;
}
+#endif
\ No newline at end of file
diff --git a/Marlin/SdVolume.h b/Marlin/SdVolume.h
index 0f2e55ab2..2ff2b6eb9 100644
--- a/Marlin/SdVolume.h
+++ b/Marlin/SdVolume.h
@@ -17,6 +17,8 @@
* along with the Arduino SdFat Library. If not, see
* .
*/
+#include "Marlin.h"
+#ifdef SDSUPPORT
#ifndef SdVolume_h
#define SdVolume_h
/**
@@ -209,3 +211,4 @@ class SdVolume {
#endif // ALLOW_DEPRECATED_FUNCTIONS
};
#endif // SdVolume
+#endif
\ No newline at end of file