Преглед на файлове

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

Bernhard преди 13 години
родител
ревизия
3814bbb529
променени са 14 файла, в които са добавени 72 реда и са изтрити 0 реда
  1. 5
    0
      Marlin/Sd2Card.cpp
  2. 7
    0
      Marlin/Sd2Card.h
  3. 6
    0
      Marlin/Sd2PinMap.h
  4. 7
    0
      Marlin/SdBaseFile.cpp
  5. 4
    0
      Marlin/SdBaseFile.h
  6. 6
    0
      Marlin/SdFatConfig.h
  7. 6
    0
      Marlin/SdFatStructs.h
  8. 3
    0
      Marlin/SdFatUtil.cpp
  9. 6
    0
      Marlin/SdFatUtil.h
  10. 5
    0
      Marlin/SdFile.cpp
  11. 5
    0
      Marlin/SdFile.h
  12. 5
    0
      Marlin/SdInfo.h
  13. 4
    0
      Marlin/SdVolume.cpp
  14. 3
    0
      Marlin/SdVolume.h

+ 5
- 0
Marlin/Sd2Card.cpp Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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 Целия файл

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…
Отказ
Запис