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

+ 1
- 5
Marlin/cardreader.pde View File

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

Loading…
Cancel
Save