Browse Source

Merge pull request #1368 from MarlinFirmware/revert-1357-SDlib

Revert "Move Sd library out into library"
galexander1 10 years ago
parent
commit
1a2f796dc7

+ 0
- 3
.travis.yml View File

26
   - cd $TRAVIS_BUILD_DIR
26
   - cd $TRAVIS_BUILD_DIR
27
   # ino needs files in src directory
27
   # ino needs files in src directory
28
   - ln -s Marlin src
28
   - ln -s Marlin src
29
-  - mkdir lib
30
-  - ln -s ../ArduinoAddons/Arduino_1.0.x/libraries/SdFat lib/SdFat
31
-  - ls -la lib/SdFat
32
   # remove Marlin.pde as it confuses ino after it finds Marlin.ino
29
   # remove Marlin.pde as it confuses ino after it finds Marlin.ino
33
   - rm Marlin/Marlin.pde
30
   - rm Marlin/Marlin.pde
34
 script:
31
 script:

+ 0
- 5
ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFat.h View File

1
-#ifndef AT90USB
2
-#define  HardwareSerial_h // trick to disable the standard HWserial
3
-#endif
4
-
5
-#include <Arduino.h>

+ 0
- 5
Marlin/Marlin.pde View File

54
 #if defined(DIGIPOT_I2C)
54
 #if defined(DIGIPOT_I2C)
55
   #include <Wire.h>
55
   #include <Wire.h>
56
 #endif
56
 #endif
57
-
58
-#if defined(HEATER_0_USES_MAX6675) || defined(SDSUPPORT)
59
-#include <Sd2Card.h>
60
-#endif
61
-

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/Sd2Card.cpp → Marlin/Sd2Card.cpp 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 "SdFat.h"
20
+#include "Marlin.h"
21
 
21
 
22
+#ifdef SDSUPPORT
22
 #include "Sd2Card.h"
23
 #include "Sd2Card.h"
23
 //------------------------------------------------------------------------------
24
 //------------------------------------------------------------------------------
24
 #ifndef SOFTWARE_SPI
25
 #ifndef SOFTWARE_SPI
718
   chipSelectHigh();
719
   chipSelectHigh();
719
   return false;
720
   return false;
720
 }
721
 }
722
+
723
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/Sd2Card.h → Marlin/Sd2Card.h View File

18
  * <http://www.gnu.org/licenses/>.
18
  * <http://www.gnu.org/licenses/>.
19
  */
19
  */
20
 
20
 
21
+#include "Marlin.h"
22
+#ifdef SDSUPPORT
23
+
21
 #ifndef Sd2Card_h
24
 #ifndef Sd2Card_h
22
 #define Sd2Card_h
25
 #define Sd2Card_h
23
 /**
26
 /**
235
   bool writeData(uint8_t token, const uint8_t* src);
238
   bool writeData(uint8_t token, const uint8_t* src);
236
 };
239
 };
237
 #endif  // Sd2Card_h
240
 #endif  // Sd2Card_h
241
+
242
+
243
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/Sd2PinMap.h → 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

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdBaseFile.cpp → Marlin/SdBaseFile.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 "SdFat.h"
21
-#include <Print.h>
20
+
21
+#include "Marlin.h"
22
+#ifdef SDSUPPORT
22
 
23
 
23
 #include "SdBaseFile.h"
24
 #include "SdBaseFile.h"
24
 //------------------------------------------------------------------------------
25
 //------------------------------------------------------------------------------
314
  * \param[in] indent Amount of space before file name. Used for recursive
315
  * \param[in] indent Amount of space before file name. Used for recursive
315
  * list to indicate subdirectory level.
316
  * list to indicate subdirectory level.
316
  */
317
  */
317
-void SdBaseFile::ls(Print *p, uint8_t flags, uint8_t indent) {
318
+void SdBaseFile::ls(uint8_t flags, uint8_t indent) {
318
   rewind();
319
   rewind();
319
   int8_t status;
320
   int8_t status;
320
-  while ((status = lsPrintNext( p, flags, indent))) {
321
+  while ((status = lsPrintNext( flags, indent))) {
321
     if (status > 1 && (flags & LS_R)) {
322
     if (status > 1 && (flags & LS_R)) {
322
       uint16_t index = curPosition()/32 - 1;
323
       uint16_t index = curPosition()/32 - 1;
323
       SdBaseFile s;
324
       SdBaseFile s;
324
-      if (s.open(this, index, O_READ)) s.ls( p, flags, indent + 2);
325
+      if (s.open(this, index, O_READ)) s.ls( flags, indent + 2);
325
       seekSet(32 * (index + 1));
326
       seekSet(32 * (index + 1));
326
     }
327
     }
327
   }
328
   }
329
 //------------------------------------------------------------------------------
330
 //------------------------------------------------------------------------------
330
 // saves 32 bytes on stack for ls recursion
331
 // saves 32 bytes on stack for ls recursion
331
 // return 0 - EOF, 1 - normal file, or 2 - directory
332
 // return 0 - EOF, 1 - normal file, or 2 - directory
332
-int8_t SdBaseFile::lsPrintNext( Print *p, uint8_t flags, uint8_t indent) {
333
-	Print &MYSERIAL = *p;
333
+int8_t SdBaseFile::lsPrintNext( uint8_t flags, uint8_t indent) {
334
   dir_t dir;
334
   dir_t dir;
335
   uint8_t w = 0;
335
   uint8_t w = 0;
336
 
336
 
365
   // print modify date/time if requested
365
   // print modify date/time if requested
366
   if (flags & LS_DATE) {
366
   if (flags & LS_DATE) {
367
     MYSERIAL.write(' ');
367
     MYSERIAL.write(' ');
368
-    printFatDate( p, dir.lastWriteDate);
368
+    printFatDate( dir.lastWriteDate);
369
     MYSERIAL.write(' ');
369
     MYSERIAL.write(' ');
370
-    printFatTime( p, dir.lastWriteTime);
370
+    printFatTime( dir.lastWriteTime);
371
   }
371
   }
372
   // print size if requested
372
   // print size if requested
373
   if (!DIR_IS_SUBDIR(&dir) && (flags & LS_SIZE)) {
373
   if (!DIR_IS_SUBDIR(&dir) && (flags & LS_SIZE)) {
939
  * \param[in] width Blank fill name if length is less than \a width.
939
  * \param[in] width Blank fill name if length is less than \a width.
940
  * \param[in] printSlash Print '/' after directory names if true.
940
  * \param[in] printSlash Print '/' after directory names if true.
941
  */
941
  */
942
-void SdBaseFile::printDirName(Print *p, const dir_t& dir, uint8_t width, bool printSlash) {
943
-		Print &MYSERIAL = *p;
942
+void SdBaseFile::printDirName(const dir_t& dir,
943
+  uint8_t width, bool printSlash) {
944
   uint8_t w = 0;
944
   uint8_t w = 0;
945
   for (uint8_t i = 0; i < 11; i++) {
945
   for (uint8_t i = 0; i < 11; i++) {
946
     if (dir.name[i] == ' ')continue;
946
     if (dir.name[i] == ' ')continue;
962
 }
962
 }
963
 //------------------------------------------------------------------------------
963
 //------------------------------------------------------------------------------
964
 // print uint8_t with width 2
964
 // print uint8_t with width 2
965
-static void print2u( Print *p, uint8_t v) {
966
-	Print &MYSERIAL = *p;
965
+static void print2u( uint8_t v) {
967
   if (v < 10) MYSERIAL.write('0');
966
   if (v < 10) MYSERIAL.write('0');
968
   MYSERIAL.print(v, DEC);
967
   MYSERIAL.print(v, DEC);
969
 }
968
 }
983
  * \param[in] pr Print stream for output.
982
  * \param[in] pr Print stream for output.
984
  * \param[in] fatDate The date field from a directory entry.
983
  * \param[in] fatDate The date field from a directory entry.
985
  */
984
  */
986
-void SdBaseFile::printFatDate(Print *p, uint16_t fatDate) {
987
-	Print &MYSERIAL = *p;
988
-
985
+void SdBaseFile::printFatDate(uint16_t fatDate) {
989
   MYSERIAL.print(FAT_YEAR(fatDate));
986
   MYSERIAL.print(FAT_YEAR(fatDate));
990
   MYSERIAL.write('-');
987
   MYSERIAL.write('-');
991
-  print2u( p, FAT_MONTH(fatDate));
988
+  print2u( FAT_MONTH(fatDate));
992
   MYSERIAL.write('-');
989
   MYSERIAL.write('-');
993
-  print2u( p, FAT_DAY(fatDate));
990
+  print2u( FAT_DAY(fatDate));
994
 }
991
 }
995
 
992
 
996
 //------------------------------------------------------------------------------
993
 //------------------------------------------------------------------------------
1001
  * \param[in] pr Print stream for output.
998
  * \param[in] pr Print stream for output.
1002
  * \param[in] fatTime The time field from a directory entry.
999
  * \param[in] fatTime The time field from a directory entry.
1003
  */
1000
  */
1004
-void SdBaseFile::printFatTime( Print *p, uint16_t fatTime) {
1005
-	Print &MYSERIAL = *p;
1006
-
1007
-  print2u( p, FAT_HOUR(fatTime));
1001
+void SdBaseFile::printFatTime( uint16_t fatTime) {
1002
+  print2u( FAT_HOUR(fatTime));
1008
   MYSERIAL.write(':');
1003
   MYSERIAL.write(':');
1009
-  print2u( p, FAT_MINUTE(fatTime));
1004
+  print2u( FAT_MINUTE(fatTime));
1010
   MYSERIAL.write(':');
1005
   MYSERIAL.write(':');
1011
-  print2u( p, FAT_SECOND(fatTime));
1006
+  print2u( FAT_SECOND(fatTime));
1012
 }
1007
 }
1013
 //------------------------------------------------------------------------------
1008
 //------------------------------------------------------------------------------
1014
 /** Print a file's name to Serial
1009
 /** Print a file's name to Serial
1016
  * \return The value one, true, is returned for success and
1011
  * \return The value one, true, is returned for success and
1017
  * the value zero, false, is returned for failure.
1012
  * the value zero, false, is returned for failure.
1018
  */
1013
  */
1019
-bool SdBaseFile::printName(Print *p) {
1020
-	Print &MYSERIAL = *p;
1014
+bool SdBaseFile::printName() {
1021
   char name[13];
1015
   char name[13];
1022
   if (!getFilename(name)) return false;
1016
   if (!getFilename(name)) return false;
1023
   MYSERIAL.print(name);
1017
   MYSERIAL.print(name);
1826
 #if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
1820
 #if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
1827
 void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0;  // NOLINT
1821
 void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0;  // NOLINT
1828
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
1822
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
1823
+
1824
+
1825
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdBaseFile.h → 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
 /**
23
  * \file
26
  * \file
24
  * \brief SdBaseFile class
27
  * \brief SdBaseFile class
25
  */
28
  */
29
+#include "Marlin.h"
26
 #include "SdFatConfig.h"
30
 #include "SdFatConfig.h"
27
 #include "SdVolume.h"
31
 #include "SdVolume.h"
28
 //------------------------------------------------------------------------------
32
 //------------------------------------------------------------------------------
170
 uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
174
 uint16_t const FAT_DEFAULT_DATE = ((2000 - 1980) << 9) | (1 << 5) | 1;
171
 /** Default time for file timestamp is 1 am */
175
 /** Default time for file timestamp is 1 am */
172
 uint16_t const FAT_DEFAULT_TIME = (1 << 11);
176
 uint16_t const FAT_DEFAULT_TIME = (1 << 11);
173
-
174
-class Print;
175
 //------------------------------------------------------------------------------
177
 //------------------------------------------------------------------------------
176
 /**
178
 /**
177
  * \class SdBaseFile
179
  * \class SdBaseFile
264
   bool isRoot() const {
266
   bool isRoot() const {
265
     return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32;
267
     return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32;
266
   }
268
   }
267
-  void ls( Print *p, uint8_t flags = 0, uint8_t indent = 0);
269
+  void ls( uint8_t flags = 0, uint8_t indent = 0);
268
   bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
270
   bool mkdir(SdBaseFile* dir, const char* path, bool pFlag = true);
269
   // alias for backward compactability
271
   // alias for backward compactability
270
   bool makeDir(SdBaseFile* dir, const char* path) {
272
   bool makeDir(SdBaseFile* dir, const char* path) {
276
   bool openNext(SdBaseFile* dirFile, uint8_t oflag);
278
   bool openNext(SdBaseFile* dirFile, uint8_t oflag);
277
   bool openRoot(SdVolume* vol);
279
   bool openRoot(SdVolume* vol);
278
   int peek();
280
   int peek();
279
-  static void printFatDate(Print *p, uint16_t fatDate);
280
-  static void printFatTime(Print *p, uint16_t fatTime);
281
-  bool printName(Print *p);
281
+  static void printFatDate(uint16_t fatDate);
282
+  static void printFatTime( uint16_t fatTime);
283
+  bool printName();
282
   int16_t read();
284
   int16_t read();
283
   int16_t read(void* buf, uint16_t nbyte);
285
   int16_t read(void* buf, uint16_t nbyte);
284
   int8_t readDir(dir_t* dir, char* longFilename);
286
   int8_t readDir(dir_t* dir, char* longFilename);
350
   bool addCluster();
352
   bool addCluster();
351
   bool addDirCluster();
353
   bool addDirCluster();
352
   dir_t* cacheDirEntry(uint8_t action);
354
   dir_t* cacheDirEntry(uint8_t action);
353
-  int8_t lsPrintNext( Print *p, uint8_t flags, uint8_t indent);
355
+  int8_t lsPrintNext( uint8_t flags, uint8_t indent);
354
   static bool make83Name(const char* str, uint8_t* name, const char** ptr);
356
   static bool make83Name(const char* str, uint8_t* name, const char** ptr);
355
   bool mkdir(SdBaseFile* parent, const uint8_t dname[11]);
357
   bool mkdir(SdBaseFile* parent, const uint8_t dname[11]);
356
   bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
358
   bool open(SdBaseFile* dirFile, const uint8_t dname[11], uint8_t oflag);
358
   dir_t* readDirCache();
360
   dir_t* readDirCache();
359
 //------------------------------------------------------------------------------
361
 //------------------------------------------------------------------------------
360
 // to be deleted
362
 // to be deleted
361
-  static void printDirName( Print *p, const dir_t& dir,
363
+  static void printDirName( const dir_t& dir,
362
     uint8_t width, bool printSlash);
364
     uint8_t width, bool printSlash);
363
 //------------------------------------------------------------------------------
365
 //------------------------------------------------------------------------------
364
 // Deprecated functions  - suppress cpplint warnings with NOLINT comment
366
 // Deprecated functions  - suppress cpplint warnings with NOLINT comment
478
 };
480
 };
479
 
481
 
480
 #endif  // SdBaseFile_h
482
 #endif  // SdBaseFile_h
483
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatConfig.h → 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>
115
 /** Total size of the buffer used to store the long filenames */
118
 /** Total size of the buffer used to store the long filenames */
116
 #define LONG_FILENAME_LENGTH (13*MAX_VFAT_ENTRIES+1)
119
 #define LONG_FILENAME_LENGTH (13*MAX_VFAT_ENTRIES+1)
117
 #endif  // SdFatConfig_h
120
 #endif  // SdFatConfig_h
121
+
122
+
123
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatStructs.h → 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
 
638
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
641
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
639
 }
642
 }
640
 #endif  // SdFatStructs_h
643
 #endif  // SdFatStructs_h
644
+
645
+
646
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatUtil.cpp → Marlin/SdFatUtil.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 "SdFat.h"
21
-#include <Print.h>
20
+#include "Marlin.h"
21
+
22
+#ifdef SDSUPPORT
22
 #include "SdFatUtil.h"
23
 #include "SdFatUtil.h"
23
 
24
 
24
 //------------------------------------------------------------------------------
25
 //------------------------------------------------------------------------------
49
  * \param[in] pr Print object for output.
50
  * \param[in] pr Print object for output.
50
  * \param[in] str Pointer to string stored in flash memory.
51
  * \param[in] str Pointer to string stored in flash memory.
51
  */
52
  */
52
-void SdFatUtil::print_P( Print *p, PGM_P str) {
53
-	Print &MYSERIAL = *p;
53
+void SdFatUtil::print_P( PGM_P str) {
54
   for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
54
   for (uint8_t c; (c = pgm_read_byte(str)); str++) MYSERIAL.write(c);
55
 }
55
 }
56
 //------------------------------------------------------------------------------
56
 //------------------------------------------------------------------------------
59
  * \param[in] pr Print object for output.
59
  * \param[in] pr Print object for output.
60
  * \param[in] str Pointer to string stored in flash memory.
60
  * \param[in] str Pointer to string stored in flash memory.
61
  */
61
  */
62
-void SdFatUtil::println_P( Print *p, PGM_P str) {
63
-	Print &MYSERIAL = *p;
64
-  print_P( p, str);
62
+void SdFatUtil::println_P( PGM_P str) {
63
+  print_P( str);
65
   MYSERIAL.println();
64
   MYSERIAL.println();
66
 }
65
 }
67
 //------------------------------------------------------------------------------
66
 //------------------------------------------------------------------------------
69
  *
68
  *
70
  * \param[in] str Pointer to string stored in flash memory.
69
  * \param[in] str Pointer to string stored in flash memory.
71
  */
70
  */
72
-void SdFatUtil::SerialPrint_P( Print *p, PGM_P str) {
73
-  print_P(p, str);
71
+void SdFatUtil::SerialPrint_P(PGM_P str) {
72
+  print_P(str);
74
 }
73
 }
75
 //------------------------------------------------------------------------------
74
 //------------------------------------------------------------------------------
76
 /** %Print a string in flash memory to Serial followed by a CR/LF.
75
 /** %Print a string in flash memory to Serial followed by a CR/LF.
77
  *
76
  *
78
  * \param[in] str Pointer to string stored in flash memory.
77
  * \param[in] str Pointer to string stored in flash memory.
79
  */
78
  */
80
-void SdFatUtil::SerialPrintln_P(Print *p, PGM_P str) {
81
-  println_P( p, str);
79
+void SdFatUtil::SerialPrintln_P(PGM_P str) {
80
+  println_P( str);
82
 }
81
 }
82
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatUtil.h → 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
 /**
23
  * \file
26
  * \file
24
  * \brief Useful utility functions.
27
  * \brief Useful utility functions.
25
  */
28
  */
29
+#include "Marlin.h"
30
+#include "MarlinSerial.h"
31
+/** Store and print a string in flash memory.*/
32
+#define PgmPrint(x) SerialPrint_P(PSTR(x))
33
+/** Store and print a string in flash memory followed by a CR/LF.*/
34
+#define PgmPrintln(x) SerialPrintln_P(PSTR(x))
26
 
35
 
27
 namespace SdFatUtil {
36
 namespace SdFatUtil {
28
   int FreeRam();
37
   int FreeRam();
29
-  void print_P( Print *p, PGM_P str);
30
-  void println_P( Print *p, PGM_P str);
31
-  void SerialPrint_P(Print *p, PGM_P str);
32
-  void SerialPrintln_P(Print *p, PGM_P str);
38
+  void print_P( PGM_P str);
39
+  void println_P( PGM_P str);
40
+  void SerialPrint_P(PGM_P str);
41
+  void SerialPrintln_P(PGM_P str);
33
 }
42
 }
43
+
34
 using namespace SdFatUtil;  // NOLINT
44
 using namespace SdFatUtil;  // NOLINT
35
 #endif  // #define SdFatUtil_h
45
 #endif  // #define SdFatUtil_h
46
+
47
+
48
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFile.cpp → Marlin/SdFile.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
+
22
+#ifdef SDSUPPORT
20
 #include "SdFile.h"
23
 #include "SdFile.h"
21
 /**  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.
22
  *
25
  *
87
   write_P(str);
90
   write_P(str);
88
   write_P(PSTR("\r\n"));
91
   write_P(PSTR("\r\n"));
89
 }
92
 }
93
+
94
+
95
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFile.h → Marlin/SdFile.h View File

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

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdInfo.h → 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

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdVolume.cpp → 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 "SdFat.h"
20
+#include "Marlin.h"
21
+#ifdef SDSUPPORT
22
+
21
 #include "SdVolume.h"
23
 #include "SdVolume.h"
22
 //------------------------------------------------------------------------------
24
 //------------------------------------------------------------------------------
23
 #if !USE_MULTIPLE_CARDS
25
 #if !USE_MULTIPLE_CARDS
400
  fail:
402
  fail:
401
   return false;
403
   return false;
402
 }
404
 }
405
+#endif

ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdVolume.h → 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

+ 2
- 3
Marlin/temperature.cpp View File

35
 #include "watchdog.h"
35
 #include "watchdog.h"
36
 #include "thermistortables.h"
36
 #include "thermistortables.h"
37
 
37
 
38
-#ifdef HEATER_0_USES_MAX6675
39
-//#include <Sd2PinMap.h>
40
-#endif
38
+#include "Sd2PinMap.h"
39
+
41
 
40
 
42
 //===========================================================================
41
 //===========================================================================
43
 //=============================public variables============================
42
 //=============================public variables============================

Loading…
Cancel
Save