Skip to content

Commit a9f2b6f

Browse files
committed
Fix for SparkFun Mbed Apollo3 Core
1 parent 4582dd4 commit a9f2b6f

File tree

13 files changed

+15
-9
lines changed

13 files changed

+15
-9
lines changed

library.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name=SdFat
2-
version=2.0.5
2+
version=2.0.6
33
license=MIT
44
author=Bill Greiman <fat16lib@sbcglobal.net>
55
maintainer=Bill Greiman <fat16lib@sbcglobal.net>

src/ExFatLib/ExFatFormatter.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ bool ExFatFormatter::format(BlockDevice* dev, uint8_t* secBuf, print_t* pr) {
201201
memset(secBuf, 0, BYTES_PER_SECTOR);
202202
// Allocate two reserved clusters, bitmap, upcase, and root clusters.
203203
secBuf[0] = 0XF8;
204-
for (size_t i = 0; i < 20; i++) {
204+
for (size_t i = 1; i < 20; i++) {
205205
secBuf[i] = 0XFF;
206206
}
207207
for (uint32_t i = 0; i < ns; i++) {

src/FatLib/FatFileLFN.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,11 @@ bool FatFile::open(FatFile* dirFile, fname_t* fname, oflag_t oflag) {
359359
if ((ldir->order & FAT_ORDER_LAST_LONG_ENTRY) == 0) {
360360
continue;
361361
}
362-
lfnOrd = order = ldir->order & 0X1F;
362+
order = ldir->order & 0X1F;
363+
if (order != (freeNeed - 1)) {
364+
continue;
365+
}
366+
lfnOrd = order;
363367
checksum = ldir->checksum;
364368
} else if (ldir->order != --order || checksum != ldir->checksum) {
365369
lfnOrd = 0;

src/SdFat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@
3838
#endif // INCLUDE_SDIOS
3939
//------------------------------------------------------------------------------
4040
/** SdFat version for cpp use. */
41-
#define SD_FAT_VERSION 20005
41+
#define SD_FAT_VERSION 20006
4242
/** SdFat version as string. */
43-
#define SD_FAT_VERSION_STR "2.0.5"
43+
#define SD_FAT_VERSION_STR "2.0.6"
4444
//==============================================================================
4545
/**
4646
* \class SdBase

src/SpiDriver/SdSpiArtemis.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,8 @@ uint8_t SdSpiArduinoDriver::receive() {
4747
}
4848
//------------------------------------------------------------------------------
4949
uint8_t SdSpiArduinoDriver::receive(uint8_t* buf, size_t count) {
50-
m_spi->transferIn(buf, count);
50+
memset(buf, 0XFF, count);
51+
m_spi->transfer(buf, count);
5152
return 0;
5253
}
5354
//------------------------------------------------------------------------------

src/common/FsCache.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
2323
* DEALINGS IN THE SOFTWARE.
2424
*/
25+
#define DBG_FILE "FsCache.cpp"
2526
#include "DebugMacros.h"
2627
#include "FsCache.h"
2728
//------------------------------------------------------------------------------

0 commit comments

Comments
 (0)