chiark / gitweb /
made sd code only compile with SDSUPPORT defined. safes 10k of codespace
authorBernhard <bkubicek@x201.(none)>
Mon, 26 Dec 2011 08:28:51 +0000 (09:28 +0100)
committerBernhard <bkubicek@x201.(none)>
Mon, 26 Dec 2011 08:28:51 +0000 (09:28 +0100)
14 files changed:
Marlin/Sd2Card.cpp
Marlin/Sd2Card.h
Marlin/Sd2PinMap.h
Marlin/SdBaseFile.cpp
Marlin/SdBaseFile.h
Marlin/SdFatConfig.h
Marlin/SdFatStructs.h
Marlin/SdFatUtil.cpp
Marlin/SdFatUtil.h
Marlin/SdFile.cpp
Marlin/SdFile.h
Marlin/SdInfo.h
Marlin/SdVolume.cpp
Marlin/SdVolume.h

index f421154ea0ea1b6c915f2d6a9668e9e24cf507e5..884fa45533f77d8afc938bed51f38bd3014f3cfd 100644 (file)
@@ -18,6 +18,8 @@
  * <http://www.gnu.org/licenses/>.\r
  */\r
 #include "Marlin.h"\r
+\r
+#ifdef SDSUPPORT\r
 #include "Sd2Card.h"\r
 //------------------------------------------------------------------------------\r
 #ifndef SOFTWARE_SPI\r
@@ -636,3 +638,6 @@ bool Sd2Card::writeStop() {
   chipSelectHigh();\r
   return false;\r
 }\r
+\r
+\r
+#endif
\ No newline at end of file
index 0e8b6665e90f66e198eee5d63a59424b732a21a5..7de5f11bcc1651ed29aa27078254efbae63b2705 100644 (file)
  * along with the Arduino Sd2Card Library.  If not, see\r
  * <http://www.gnu.org/licenses/>.\r
  */\r
+\r
+#include "Marlin.h"\r
+#ifdef SDSUPPORT\r
+\r
 #ifndef Sd2Card_h\r
 #define Sd2Card_h\r
 /**\r
@@ -232,3 +236,6 @@ class Sd2Card {
   bool writeData(uint8_t token, const uint8_t* src);\r
 };\r
 #endif  // Sd2Card_h\r
+\r
+\r
+#endif
\ No newline at end of file
index 77a74987c03c561947a50ad76c58a598c7dd2dcc..a40729df2d4affd2f2f1317e4df361a6a5d07229 100644 (file)
@@ -18,6 +18,9 @@
  * <http://www.gnu.org/licenses/>.\r
  */\r
 // Warning this file was generated by a program.\r
+#include "Marlin.h"\r
+#ifdef SDSUPPORT\r
+\r
 #ifndef Sd2PinMap_h\r
 #define Sd2PinMap_h\r
 #include <avr/io.h>\r
@@ -360,3 +363,6 @@ static inline __attribute__((always_inline))
   }\r
 }\r
 #endif  // Sd2PinMap_h\r
+\r
+\r
+#endif
\ No newline at end of file
index d33b1e038b091289a1a0c7423819e469fd988ca1..f8dc83adeb9edd14b83df4a0b0410f6062281a10 100644 (file)
  */
 
 #define SERIAL MSerial
+
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
 #include "SdBaseFile.h"
 //------------------------------------------------------------------------------
 // pointer to cwd directory
@@ -1784,3 +1788,6 @@ int16_t SdBaseFile::write(const void* buf, uint16_t nbyte) {
 #if ALLOW_DEPRECATED_FUNCTIONS && !defined(DOXYGEN)
 void (*SdBaseFile::oldDateTime_)(uint16_t& date, uint16_t& time) = 0;  // NOLINT
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
+
+
+#endif
\ No newline at end of file
index 80402e56c321a2b84d2441241d539e9f9ae1cfb9..1bf75f6f2487c63e30312ec5a417ab459f8243c0 100644 (file)
@@ -17,6 +17,9 @@
  * along with the Arduino SdFat Library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
 #ifndef SdBaseFile_h
 #define SdBaseFile_h
 /**
@@ -477,3 +480,4 @@ class SdBaseFile {
 };
 
 #endif  // SdBaseFile_h
+#endif
\ No newline at end of file
index 036bdb9c62749111f3b9031f0a8c3008ee914639..2a78c2a85774315472b872a3d283d333aa80ae8b 100644 (file)
@@ -21,6 +21,9 @@
  * \file
  * \brief configuration definitions
  */
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
 #ifndef SdFatConfig_h
 #define SdFatConfig_h
 #include <stdint.h>
@@ -106,3 +109,6 @@ uint8_t const SOFT_SPI_SCK_PIN = 13;
  */
 #define USE_CXA_PURE_VIRTUAL 1
 #endif  // SdFatConfig_h
+
+
+#endif
\ No newline at end of file
index 4ea82b766cf14989de0fef015eb34a51b152a681..7ad88d67fc35f8068682f5975662884a37431ab1 100644 (file)
@@ -17,6 +17,9 @@
  * along with the Arduino SdFat Library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+#include "Marlin.h"
+#ifdef SDSUPPORT
+
 #ifndef SdFatStructs_h
 #define SdFatStructs_h
 /**
@@ -602,3 +605,6 @@ static inline uint8_t DIR_IS_FILE_OR_SUBDIR(const dir_t* dir) {
   return (dir->attributes & DIR_ATT_VOLUME_ID) == 0;
 }
 #endif  // SdFatStructs_h
+
+
+#endif
\ No newline at end of file
index 559305f11ecb36b67ac142e6c07359b4e98dc645..ffbcba0c695d78865b2213f48f049e43b6154148 100644 (file)
@@ -18,6 +18,8 @@
  * <http://www.gnu.org/licenses/>.
  */
 #include "Marlin.h"
+
+#ifdef SDSUPPORT
 #include "SdFatUtil.h"
 
 //------------------------------------------------------------------------------
@@ -74,3 +76,4 @@ void SdFatUtil::SerialPrint_P(PGM_P str) {
 void SdFatUtil::SerialPrintln_P(PGM_P str) {
   println_P( str);
 }
+#endif
index d843da04c512fc3724b37cba1e85a39154d4f365..7f1809422b322ea94acd5b1caf4750c9a8364332 100644 (file)
@@ -17,6 +17,9 @@
  * along with the Arduino SdFat Library.  If not, see\r
  * <http://www.gnu.org/licenses/>.\r
  */\r
+#include "Marlin.h"\r
+#ifdef SDSUPPORT\r
+\r
 #ifndef SdFatUtil_h\r
 #define SdFatUtil_h\r
 /**\r
@@ -40,3 +43,6 @@ namespace SdFatUtil {
 \r
 using namespace SdFatUtil;  // NOLINT\r
 #endif  // #define SdFatUtil_h\r
+\r
+\r
+#endif
\ No newline at end of file
index eda85b3ea2c09f03cfbb0b5b332fad87b0d6b556..e9439e3b5040b755d568d2562c3889d6513509b3 100644 (file)
@@ -18,6 +18,8 @@
  * <http://www.gnu.org/licenses/>.\r
  */\r
 #include "Marlin.h"\r
+\r
+#ifdef SDSUPPORT\r
 #include "SdFile.h"\r
 /**  Create a file object and open it in the current working directory.\r
  *\r
@@ -85,3 +87,6 @@ void SdFile::writeln_P(PGM_P str) {
   write_P(str);\r
   write_P(PSTR("\r\n"));\r
 }\r
+\r
+\r
+#endif
\ No newline at end of file
index a9efebc684e6ab62c5179f067358f7a21e6d84ed..cbf1bbdbd90474158223435f84fede595bb8fd78 100644 (file)
@@ -22,6 +22,8 @@
  * \brief SdFile class
  */
 #include "Marlin.h"
+
+#ifdef SDSUPPORT
 #include "SdBaseFile.h"
 #include <Print.h>
 #ifndef SdFile_h
@@ -47,3 +49,6 @@ class SdFile : public SdBaseFile, public Print {
   void writeln_P(PGM_P str);
 };
 #endif  // SdFile_h
+
+
+#endif
\ No newline at end of file
index 2a58eb7db41de9f705d749873387d3a16cb3063b..03ece102243fa32a4c72cea35d67086a8a7391db 100644 (file)
@@ -17,6 +17,9 @@
  * along with the Arduino Sd2Card Library.  If not, see\r
  * <http://www.gnu.org/licenses/>.\r
  */\r
+#include "Marlin.h"\r
+#ifdef SDSUPPORT\r
+\r
 #ifndef SdInfo_h\r
 #define SdInfo_h\r
 #include <stdint.h>\r
@@ -273,3 +276,5 @@ union csd_t {
   csd2_t v2;\r
 };\r
 #endif  // SdInfo_h\r
+\r
+#endif
\ No newline at end of file
index a14bb627ed75b423ead7421c716a8f77f9f726c1..f14d7bc70b85c4cf91e59620189c0d5ceb1962a2 100644 (file)
@@ -17,6 +17,9 @@
  * along with the Arduino SdFat Library.  If not, see\r
  * <http://www.gnu.org/licenses/>.\r
  */\r
+#include "Marlin.h"\r
+#ifdef SDSUPPORT\r
+\r
 #include "SdVolume.h"\r
 //------------------------------------------------------------------------------\r
 #if !USE_MULTIPLE_CARDS\r
@@ -399,3 +402,4 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
  fail:\r
   return false;\r
 }\r
+#endif
\ No newline at end of file
index 0f2e55ab2acebb6962564e739bfb030ab32fdee8..2ff2b6eb964768dc3d18ab09ee16908b7f186332 100644 (file)
@@ -17,6 +17,8 @@
  * along with the Arduino SdFat Library.  If not, see
  * <http://www.gnu.org/licenses/>.
  */
+#include "Marlin.h"
+#ifdef SDSUPPORT
 #ifndef SdVolume_h
 #define SdVolume_h
 /**
@@ -209,3 +211,4 @@ class SdVolume {
 #endif  // ALLOW_DEPRECATED_FUNCTIONS
 };
 #endif  // SdVolume
+#endif
\ No newline at end of file