Explorar el Código

Merge pull request #1357 from odewdney/SDlib

Move Sd library out into library
Bo Herrmannsen hace 10 años
padre
commit
4b51b5a46d

+ 3
- 0
.travis.yml Ver fichero

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
29
   # remove Marlin.pde as it confuses ino after it finds Marlin.ino
32
   # remove Marlin.pde as it confuses ino after it finds Marlin.ino
30
   - rm Marlin/Marlin.pde
33
   - rm Marlin/Marlin.pde
31
 script:
34
 script:

Marlin/Sd2Card.cpp → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/Sd2Card.cpp Ver fichero

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

Marlin/Sd2Card.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/Sd2Card.h Ver fichero

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

Marlin/Sd2PinMap.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/Sd2PinMap.h Ver fichero

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
-
24
 #ifndef Sd2PinMap_h
21
 #ifndef Sd2PinMap_h
25
 #define Sd2PinMap_h
22
 #define Sd2PinMap_h
26
 #include <avr/io.h>
23
 #include <avr/io.h>
363
   }
360
   }
364
 }
361
 }
365
 #endif  // Sd2PinMap_h
362
 #endif  // Sd2PinMap_h
366
-
367
-
368
-#endif

Marlin/SdBaseFile.cpp → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdBaseFile.cpp Ver fichero

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

Marlin/SdBaseFile.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdBaseFile.h Ver fichero

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

+ 5
- 0
ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFat.h Ver fichero

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

Marlin/SdFatConfig.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatConfig.h Ver fichero

21
  * \file
21
  * \file
22
  * \brief configuration definitions
22
  * \brief configuration definitions
23
  */
23
  */
24
-#include "Marlin.h"
25
-#ifdef SDSUPPORT
26
-
27
 #ifndef SdFatConfig_h
24
 #ifndef SdFatConfig_h
28
 #define SdFatConfig_h
25
 #define SdFatConfig_h
29
 #include <stdint.h>
26
 #include <stdint.h>
118
 /** Total size of the buffer used to store the long filenames */
115
 /** Total size of the buffer used to store the long filenames */
119
 #define LONG_FILENAME_LENGTH (13*MAX_VFAT_ENTRIES+1)
116
 #define LONG_FILENAME_LENGTH (13*MAX_VFAT_ENTRIES+1)
120
 #endif  // SdFatConfig_h
117
 #endif  // SdFatConfig_h
121
-
122
-
123
-#endif

Marlin/SdFatStructs.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatStructs.h Ver fichero

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
-
23
 #ifndef SdFatStructs_h
20
 #ifndef SdFatStructs_h
24
 #define SdFatStructs_h
21
 #define SdFatStructs_h
25
 
22
 
641
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
638
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
642
 }
639
 }
643
 #endif  // SdFatStructs_h
640
 #endif  // SdFatStructs_h
644
-
645
-
646
-#endif

Marlin/SdFatUtil.cpp → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatUtil.cpp Ver fichero

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

Marlin/SdFatUtil.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFatUtil.h Ver fichero

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
-
23
 #ifndef SdFatUtil_h
20
 #ifndef SdFatUtil_h
24
 #define SdFatUtil_h
21
 #define SdFatUtil_h
25
 /**
22
 /**
26
  * \file
23
  * \file
27
  * \brief Useful utility functions.
24
  * \brief Useful utility functions.
28
  */
25
  */
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))
35
 
26
 
36
 namespace SdFatUtil {
27
 namespace SdFatUtil {
37
   int FreeRam();
28
   int FreeRam();
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);
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);
42
 }
33
 }
43
-
44
 using namespace SdFatUtil;  // NOLINT
34
 using namespace SdFatUtil;  // NOLINT
45
 #endif  // #define SdFatUtil_h
35
 #endif  // #define SdFatUtil_h
46
-
47
-
48
-#endif

Marlin/SdFile.cpp → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFile.cpp Ver fichero

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
23
 #include "SdFile.h"
20
 #include "SdFile.h"
24
 /**  Create a file object and open it in the current working directory.
21
 /**  Create a file object and open it in the current working directory.
25
  *
22
  *
90
   write_P(str);
87
   write_P(str);
91
   write_P(PSTR("\r\n"));
88
   write_P(PSTR("\r\n"));
92
 }
89
 }
93
-
94
-
95
-#endif

Marlin/SdFile.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdFile.h Ver fichero

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

Marlin/SdInfo.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdInfo.h Ver fichero

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
-
23
 #ifndef SdInfo_h
20
 #ifndef SdInfo_h
24
 #define SdInfo_h
21
 #define SdInfo_h
25
 #include <stdint.h>
22
 #include <stdint.h>
276
   csd2_t v2;
273
   csd2_t v2;
277
 };
274
 };
278
 #endif  // SdInfo_h
275
 #endif  // SdInfo_h
279
-
280
-#endif

Marlin/SdVolume.cpp → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdVolume.cpp Ver fichero

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 "SdFat.h"
23
 #include "SdVolume.h"
21
 #include "SdVolume.h"
24
 //------------------------------------------------------------------------------
22
 //------------------------------------------------------------------------------
25
 #if !USE_MULTIPLE_CARDS
23
 #if !USE_MULTIPLE_CARDS
402
  fail:
400
  fail:
403
   return false;
401
   return false;
404
 }
402
 }
405
-#endif

Marlin/SdVolume.h → ArduinoAddons/Arduino_1.0.x/libraries/SdFat/SdVolume.h Ver fichero

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
 #ifndef SdVolume_h
20
 #ifndef SdVolume_h
23
 #define SdVolume_h
21
 #define SdVolume_h
24
 /**
22
 /**
211
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
209
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
212
 };
210
 };
213
 #endif  // SdVolume
211
 #endif  // SdVolume
214
-#endif

+ 5
- 0
Marlin/Marlin.pde Ver fichero

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
+

+ 3
- 2
Marlin/temperature.cpp Ver fichero

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

Loading…
Cancelar
Guardar