Browse Source

make it compile without sd_support

Bernhard Kubicek 13 years ago
parent
commit
5ad1d19384
2 changed files with 8 additions and 12 deletions
  1. 7
    7
      Marlin/cardreader.h
  2. 1
    5
      Marlin/cardreader.pde

+ 7
- 7
Marlin/cardreader.h View File

@@ -20,17 +20,15 @@ public:
20 20
   void closefile();
21 21
   void release();
22 22
   void startFileprint();
23
-  //void startFilewrite(char *name);
24 23
   void pauseSDPrint();
25 24
   void getStatus();
26
-  void cd(char * absolutPath);
27
-  //void selectFile(char* name);
25
+
28 26
   void getfilename(const uint8_t nr);
29 27
   uint16_t getnrfilenames();
30 28
   
31 29
 
32 30
   void ls();
33
-  void lsDive(char *prepend,SdFile parent);
31
+  
34 32
 
35 33
   inline bool eof() { return sdpos>=filesize ;};
36 34
   inline int16_t get() {  sdpos = file.curPosition();return (int16_t)file.read();};
@@ -57,10 +55,13 @@ private:
57 55
   LsAction lsAction; //stored for recursion.
58 56
   int16_t nrFiles; //counter for the files in the current directory and recycled as position counter for getting the nrFiles'th name in the directory.
59 57
   char* diveDirName;
58
+  void lsDive(char *prepend,SdFile parent);
60 59
 };
61 60
   
62 61
 
63 62
 #else
63
+
64
+#define dir_t bool 
64 65
 class CardReader
65 66
 {
66 67
 public:
@@ -71,6 +72,7 @@ public:
71 72
   
72 73
   inline static void checkautostart(bool x) {}; 
73 74
   
75
+  inline static void openFile(char* name,bool read){};
74 76
   inline static void closefile() {};
75 77
   inline static void release(){};
76 78
   inline static void startFileprint(){};
@@ -87,9 +89,7 @@ public:
87 89
   inline static bool eof() {return true;};
88 90
   inline static char get() {return 0;};
89 91
   inline static void setIndex(){};
92
+  inline uint8_t percentDone(){return 0;};
90 93
 };
91 94
 #endif //SDSUPPORT
92
-  
93
-  
94
-  
95 95
 #endif

+ 1
- 5
Marlin/cardreader.pde View File

@@ -1,5 +1,5 @@
1
-#ifdef SDSUPPORT
2 1
 #include "cardreader.h"
2
+#ifdef SDSUPPORT
3 3
 
4 4
 CardReader::CardReader()
5 5
 {
@@ -378,9 +378,5 @@ uint16_t CardReader::getnrfilenames()
378 378
   return nrFiles;
379 379
 }
380 380
 
381
-void CardReader::cd(char * absolutPath)
382
-{
383
-  
384
-}
385 381
 
386 382
 #endif //SDSUPPORT

Loading…
Cancel
Save