Skip to content

Commit 3d25ee9

Browse files
committed
Update FileSdFatMMC.h
1 parent 0740353 commit 3d25ee9

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

Firmware/RTK_Surveyor/FileSdFatMMC.h

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ class FileSdFatMMC : public SdFile
5252
else
5353
return _file;
5454
#endif
55+
return false; // Keep the compiler happy
5556
};
5657

5758
size_t println(const char printMe[])
@@ -62,6 +63,7 @@ class FileSdFatMMC : public SdFile
6263
else
6364
return _file->println(printMe);
6465
#endif
66+
return 0; // Keep the compiler happy
6567
};
6668

6769
bool open(const char *filepath, oflag_t mode)
@@ -86,6 +88,7 @@ class FileSdFatMMC : public SdFile
8688
return false;
8789
}
8890
#endif
91+
return false; // Keep the compiler happy
8992
};
9093

9194
uint32_t size()
@@ -96,6 +99,7 @@ class FileSdFatMMC : public SdFile
9699
else
97100
return _file->size();
98101
#endif
102+
return 0; // Keep the compiler happy
99103
};
100104

101105
uint32_t position()
@@ -106,6 +110,7 @@ class FileSdFatMMC : public SdFile
106110
else
107111
return _file->position();
108112
#endif
113+
return 0; // Keep the compiler happy
109114
};
110115

111116
int available()
@@ -116,6 +121,7 @@ class FileSdFatMMC : public SdFile
116121
else
117122
return _file->available();
118123
#endif
124+
return 0; // Keep the compiler happy
119125
};
120126

121127
int read(uint8_t *buf, uint16_t nbyte)
@@ -126,6 +132,7 @@ class FileSdFatMMC : public SdFile
126132
else
127133
return _file->read(buf, nbyte);
128134
#endif
135+
return 0; // Keep the compiler happy
129136
};
130137

131138
size_t write(const uint8_t *buf, size_t size)
@@ -136,6 +143,7 @@ class FileSdFatMMC : public SdFile
136143
else
137144
return _file->write(buf, size);
138145
#endif
146+
return 0; // Keep the compiler happy
139147
};
140148

141149
void close()
@@ -148,6 +156,16 @@ class FileSdFatMMC : public SdFile
148156
#endif
149157
};
150158

159+
void flush()
160+
{
161+
if (USE_SPI_MICROSD)
162+
_sdFile->flush();
163+
#ifdef COMPILE_SD_MMC
164+
else
165+
_file->flush();
166+
#endif
167+
};
168+
151169
void updateFileAccessTimestamp()
152170
{
153171
if (USE_SPI_MICROSD)
@@ -186,6 +204,7 @@ class FileSdFatMMC : public SdFile
186204
else
187205
return _file->size();
188206
#endif
207+
return 0; // Keep the compiler happy
189208
};
190209

191210
protected:

0 commit comments

Comments
 (0)