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

This commit is contained in:
Bernhard 2011-12-26 09:28:51 +01:00
parent 729cde4475
commit 3814bbb529
14 changed files with 72 additions and 0 deletions

View File

@ -18,6 +18,8 @@
* <http://www.gnu.org/licenses/>.
*/
#include "Marlin.h"
#ifdef SDSUPPORT
#include "Sd2Card.h"
//------------------------------------------------------------------------------
#ifndef SOFTWARE_SPI
@ -636,3 +638,6 @@ bool Sd2Card::writeStop() {
chipSelectHigh();
return false;
}
#endif

View File

@ -17,6 +17,10 @@
* along with the Arduino Sd2Card Library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include "Marlin.h"
#ifdef SDSUPPORT
#ifndef Sd2Card_h
#define Sd2Card_h
/**
@ -232,3 +236,6 @@ class Sd2Card {
bool writeData(uint8_t token, const uint8_t* src);
};
#endif // Sd2Card_h
#endif

View File

@ -18,6 +18,9 @@
* <http://www.gnu.org/licenses/>.
*/
// Warning this file was generated by a program.
#include "Marlin.h"
#ifdef SDSUPPORT
#ifndef Sd2PinMap_h
#define Sd2PinMap_h
#include <avr/io.h>
@ -360,3 +363,6 @@ static inline __attribute__((always_inline))
}
}
#endif // Sd2PinMap_h
#endif

View File

@ -19,6 +19,10 @@
*/
#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

View 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

View 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

View 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

View 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

View 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 SdFatUtil_h
#define SdFatUtil_h
/**
@ -40,3 +43,6 @@ namespace SdFatUtil {
using namespace SdFatUtil; // NOLINT
#endif // #define SdFatUtil_h
#endif

View File

@ -18,6 +18,8 @@
* <http://www.gnu.org/licenses/>.
*/
#include "Marlin.h"
#ifdef SDSUPPORT
#include "SdFile.h"
/** Create a file object and open it in the current working directory.
*
@ -85,3 +87,6 @@ void SdFile::writeln_P(PGM_P str) {
write_P(str);
write_P(PSTR("\r\n"));
}
#endif

View 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

View File

@ -17,6 +17,9 @@
* along with the Arduino Sd2Card Library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include "Marlin.h"
#ifdef SDSUPPORT
#ifndef SdInfo_h
#define SdInfo_h
#include <stdint.h>
@ -273,3 +276,5 @@ union csd_t {
csd2_t v2;
};
#endif // SdInfo_h
#endif

View File

@ -17,6 +17,9 @@
* along with the Arduino SdFat Library. If not, see
* <http://www.gnu.org/licenses/>.
*/
#include "Marlin.h"
#ifdef SDSUPPORT
#include "SdVolume.h"
//------------------------------------------------------------------------------
#if !USE_MULTIPLE_CARDS
@ -399,3 +402,4 @@ bool SdVolume::init(Sd2Card* dev, uint8_t part) {
fail:
return false;
}
#endif

View 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