瀏覽代碼

made sd code only compile with SDSUPPORT defined. safes 10k of codespace

Bernhard 13 年之前
父節點
當前提交
3814bbb529

+ 5
- 0
Marlin/Sd2Card.cpp 查看文件

@@ -18,6 +18,8 @@
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 #include "Marlin.h"
21
+
22
+#ifdef SDSUPPORT
21 23
 #include "Sd2Card.h"
22 24
 //------------------------------------------------------------------------------
23 25
 #ifndef SOFTWARE_SPI
@@ -636,3 +638,6 @@ bool Sd2Card::writeStop() {
636 638
   chipSelectHigh();
637 639
   return false;
638 640
 }
641
+
642
+
643
+#endif

+ 7
- 0
Marlin/Sd2Card.h 查看文件

@@ -17,6 +17,10 @@
17 17
  * along with the Arduino Sd2Card Library.  If not, see
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20
+
21
+#include "Marlin.h"
22
+#ifdef SDSUPPORT
23
+
20 24
 #ifndef Sd2Card_h
21 25
 #define Sd2Card_h
22 26
 /**
@@ -232,3 +236,6 @@ class Sd2Card {
232 236
   bool writeData(uint8_t token, const uint8_t* src);
233 237
 };
234 238
 #endif  // Sd2Card_h
239
+
240
+
241
+#endif

+ 6
- 0
Marlin/Sd2PinMap.h 查看文件

@@ -18,6 +18,9 @@
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 // Warning this file was generated by a program.
21
+#include "Marlin.h"
22
+#ifdef SDSUPPORT
23
+
21 24
 #ifndef Sd2PinMap_h
22 25
 #define Sd2PinMap_h
23 26
 #include <avr/io.h>
@@ -360,3 +363,6 @@ static inline __attribute__((always_inline))
360 363
   }
361 364
 }
362 365
 #endif  // Sd2PinMap_h
366
+
367
+
368
+#endif

+ 7
- 0
Marlin/SdBaseFile.cpp 查看文件

@@ -19,6 +19,10 @@
19 19
  */
20 20
 
21 21
 #define SERIAL MSerial
22
+
23
+#include "Marlin.h"
24
+#ifdef SDSUPPORT
25
+
22 26
 #include "SdBaseFile.h"
23 27
 //------------------------------------------------------------------------------
24 28
 // pointer to cwd directory
@@ -1784,3 +1788,6 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
1784 1788
 #if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
1785 1789
 void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0;  // NOLINT
1786 1790
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
1791
+
1792
+
1793
+#endif

+ 4
- 0
Marlin/SdBaseFile.h 查看文件

@@ -17,6 +17,9 @@
17 17
  * along with the Arduino SdFat Library.  If not, see
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20
+#include "Marlin.h"
21
+#ifdef SDSUPPORT
22
+
20 23
 #ifndef SdBaseFile_h
21 24
 #define SdBaseFile_h
22 25
 /**
@@ -477,3 +480,4 @@ class SdBaseFile {
477 480
 };
478 481
 
479 482
 #endif  // SdBaseFile_h
483
+#endif

+ 6
- 0
Marlin/SdFatConfig.h 查看文件

@@ -21,6 +21,9 @@
21 21
  * \file
22 22
  * \brief configuration definitions
23 23
  */
24
+#include "Marlin.h"
25
+#ifdef SDSUPPORT
26
+
24 27
 #ifndef SdFatConfig_h
25 28
 #define SdFatConfig_h
26 29
 #include <stdint.h>
@@ -106,3 +109,6 @@ uint8_t const SOFT_SPI_SCK_PIN = 13;
106 109
  */
107 110
 #define USE_CXA_PURE_VIRTUAL 1
108 111
 #endif  // SdFatConfig_h
112
+
113
+
114
+#endif

+ 6
- 0
Marlin/SdFatStructs.h 查看文件

@@ -17,6 +17,9 @@
17 17
  * along with the Arduino SdFat Library.  If not, see
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20
+#include "Marlin.h"
21
+#ifdef SDSUPPORT
22
+
20 23
 #ifndef SdFatStructs_h
21 24
 #define SdFatStructs_h
22 25
 /**
@@ -602,3 +605,6 @@ static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
602 605
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
603 606
 }
604 607
 #endif  // SdFatStructs_h
608
+
609
+
610
+#endif

+ 3
- 0
Marlin/SdFatUtil.cpp 查看文件

@@ -18,6 +18,8 @@
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 #include "Marlin.h"
21
+
22
+#ifdef SDSUPPORT
21 23
 #include "SdFatUtil.h"
22 24
 
23 25
 //------------------------------------------------------------------------------
@@ -74,3 +76,4 @@ void SdFatUtil::SerialPrint_P(PGM_P str) {
74 76
 void SdFatUtil::SerialPrintln_P(PGM_P str) {
75 77
   println_P( str);
76 78
 }
79
+#endif

+ 6
- 0
Marlin/SdFatUtil.h 查看文件

@@ -17,6 +17,9 @@
17 17
  * along with the Arduino SdFat Library.  If not, see
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20
+#include "Marlin.h"
21
+#ifdef SDSUPPORT
22
+
20 23
 #ifndef SdFatUtil_h
21 24
 #define SdFatUtil_h
22 25
 /**
@@ -40,3 +43,6 @@ namespace SdFatUtil {
40 43
 
41 44
 using namespace SdFatUtil;  // NOLINT
42 45
 #endif  // #define SdFatUtil_h
46
+
47
+
48
+#endif

+ 5
- 0
Marlin/SdFile.cpp 查看文件

@@ -18,6 +18,8 @@
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20 20
 #include "Marlin.h"
21
+
22
+#ifdef SDSUPPORT
21 23
 #include "SdFile.h"
22 24
 /**  Create a file object and open it in the current working directory.
23 25
  *
@@ -85,3 +87,6 @@ void SdFile::writeln_P(PGM_P str) {
85 87
   write_P(str);
86 88
   write_P(PSTR("\r\n"));
87 89
 }
90
+
91
+
92
+#endif

+ 5
- 0
Marlin/SdFile.h 查看文件

@@ -22,6 +22,8 @@
22 22
  * \brief SdFile class
23 23
  */
24 24
 #include "Marlin.h"
25
+
26
+#ifdef SDSUPPORT
25 27
 #include "SdBaseFile.h"
26 28
 #include <Print.h>
27 29
 #ifndef SdFile_h
@@ -47,3 +49,6 @@ class SdFile : public SdBaseFile, public Print {
47 49
   void writeln_P(PGM_P str);
48 50
 };
49 51
 #endif  // SdFile_h
52
+
53
+
54
+#endif

+ 5
- 0
Marlin/SdInfo.h 查看文件

@@ -17,6 +17,9 @@
17 17
  * along with the Arduino Sd2Card Library.  If not, see
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20
+#include "Marlin.h"
21
+#ifdef SDSUPPORT
22
+
20 23
 #ifndef SdInfo_h
21 24
 #define SdInfo_h
22 25
 #include <stdint.h>
@@ -273,3 +276,5 @@ union csd_t {
273 276
   csd2_t v2;
274 277
 };
275 278
 #endif  // SdInfo_h
279
+
280
+#endif

+ 4
- 0
Marlin/SdVolume.cpp 查看文件

@@ -17,6 +17,9 @@
17 17
  * along with the Arduino SdFat Library.  If not, see
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20
+#include "Marlin.h"
21
+#ifdef SDSUPPORT
22
+
20 23
 #include "SdVolume.h"
21 24
 //------------------------------------------------------------------------------
22 25
 #if !USE_MULTIPLE_CARDS
@@ -399,3 +402,4 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
399 402
  fail:
400 403
   return false;
401 404
 }
405
+#endif

+ 3
- 0
Marlin/SdVolume.h 查看文件

@@ -17,6 +17,8 @@
17 17
  * along with the Arduino SdFat Library.  If not, see
18 18
  * <http://www.gnu.org/licenses/>.
19 19
  */
20
+#include "Marlin.h"
21
+#ifdef SDSUPPORT
20 22
 #ifndef SdVolume_h
21 23
 #define SdVolume_h
22 24
 /**
@@ -209,3 +211,4 @@ class SdVolume {
209 211
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
210 212
 };
211 213
 #endif  // SdVolume
214
+#endif

Loading…
取消
儲存