Browse Source

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

pull/1/head
Bernhard 13 years ago
parent
commit
3814bbb529
  1. 5
      Marlin/Sd2Card.cpp
  2. 7
      Marlin/Sd2Card.h
  3. 6
      Marlin/Sd2PinMap.h
  4. 7
      Marlin/SdBaseFile.cpp
  5. 4
      Marlin/SdBaseFile.h
  6. 6
      Marlin/SdFatConfig.h
  7. 6
      Marlin/SdFatStructs.h
  8. 3
      Marlin/SdFatUtil.cpp
  9. 6
      Marlin/SdFatUtil.h
  10. 5
      Marlin/SdFile.cpp
  11. 5
      Marlin/SdFile.h
  12. 5
      Marlin/SdInfo.h
  13. 4
      Marlin/SdVolume.cpp
  14. 3
      Marlin/SdVolume.h

5
Marlin/Sd2Card.cpp

@ -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

7
Marlin/Sd2Card.h

@ -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

6
Marlin/Sd2PinMap.h

@ -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

7
Marlin/SdBaseFile.cpp

@ -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

4
Marlin/SdBaseFile.h

@ -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

6
Marlin/SdFatConfig.h

@ -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

6
Marlin/SdFatStructs.h

@ -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

3
Marlin/SdFatUtil.cpp

@ -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

6
Marlin/SdFatUtil.h

@ -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

5
Marlin/SdFile.cpp

@ -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

5
Marlin/SdFile.h

@ -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

5
Marlin/SdInfo.h

@ -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

4
Marlin/SdVolume.cpp

@ -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

3
Marlin/SdVolume.h

@ -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
Loading…
Cancel
Save