Browse Source

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

Bernhard 13 years ago
parent
commit
3814bbb529

+ 5
- 0
Marlin/Sd2Card.cpp View File

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

+ 7
- 0
Marlin/Sd2Card.h View File

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

+ 6
- 0
Marlin/Sd2PinMap.h View File

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

+ 7
- 0
Marlin/SdBaseFile.cpp View File

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

+ 4
- 0
Marlin/SdBaseFile.h View File

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

+ 6
- 0
Marlin/SdFatConfig.h View File

21
  * \file
21
  * \file
22
  * \brief configuration definitions
22
  * \brief configuration definitions
23
  */
23
  */
24
+#include "Marlin.h"
25
+#ifdef SDSUPPORT
26
+
24
 #ifndef SdFatConfig_h
27
 #ifndef SdFatConfig_h
25
 #define SdFatConfig_h
28
 #define SdFatConfig_h
26
 #include <stdint.h>
29
 #include <stdint.h>
106
  */
109
  */
107
 #define USE_CXA_PURE_VIRTUAL 1
110
 #define USE_CXA_PURE_VIRTUAL 1
108
 #endif  // SdFatConfig_h
111
 #endif  // SdFatConfig_h
112
+
113
+
114
+#endif

+ 6
- 0
Marlin/SdFatStructs.h View File

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

+ 3
- 0
Marlin/SdFatUtil.cpp View File

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

+ 6
- 0
Marlin/SdFatUtil.h View File

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

+ 5
- 0
Marlin/SdFile.cpp View File

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

+ 5
- 0
Marlin/SdFile.h View File

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

+ 5
- 0
Marlin/SdInfo.h View File

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

+ 4
- 0
Marlin/SdVolume.cpp View File

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

+ 3
- 0
Marlin/SdVolume.h View File

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

Loading…
Cancel
Save