Skip to content

Commit baf91a7

Browse files
committed
update to MLA release (FILEIO v1.05)
• Speed improvement when searching for free cluster to create new file. By starting at the last successfully found cluster rather than the start of the drive. • Fixes issue of writing after seeking causing trailing 0s in the file. • Fixes error in DirectoryRemove failing to correctly delete folder when folder contains previously deleted folders/files. • Fixes issue where a file marked with 8.3 designator not recognized as 8.3 file. • Speed improvements for the seek function. • Fixes issue where some drives may not mount successfully. • Fixes issue where format request may not happen successfully.
1 parent cbe56de commit baf91a7

File tree

9 files changed

+148
-191
lines changed

9 files changed

+148
-191
lines changed

doc/help_mla_fileio.jar

-930 KB
Binary file not shown.

doc/help_mla_fileio.pdf

506 Bytes
Binary file not shown.

drivers/internal_flash/internal_flash.c

Lines changed: 14 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -609,13 +609,13 @@ uint8_t FILEIO_InternalFlash_SectorWrite(void* config, uint32_t sector_addr, uin
609609
//Write the data
610610
#if defined(__XC8)
611611
TABLAT = *p++;
612-
#asm
613-
tblwtpostinc
614-
#endasm
615-
sectorCounter++;
616-
#elif defined(__18CXX)
617-
TABLAT = *p++;
618-
_asm tblwtpostinc _endasm
612+
#if defined(__CLANG__)
613+
asm("tblwtpostinc");
614+
#else
615+
#asm
616+
tblwtpostinc
617+
#endasm
618+
#endif
619619
sectorCounter++;
620620
#endif
621621

@@ -629,22 +629,18 @@ uint8_t FILEIO_InternalFlash_SectorWrite(void* config, uint32_t sector_addr, uin
629629
//Now commit/write the block of data from the programming latches into the flash memory
630630
#if defined(__XC8)
631631
// Start the write process: for PIC18, first need to reposition tblptr back into memory block that we want to write to.
632-
#asm
633-
tblrdpostdec
634-
#endasm
632+
#if defined(__CLANG__)
633+
asm("tblrdpostdec");
634+
#else
635+
#asm
636+
tblrdpostdec
637+
#endasm
638+
#endif
635639

636640
// Write flash memory, enable write control.
637641
EECON1 = 0x84;
638642
UnlockAndActivate(NVM_UNLOCK_KEY);
639643
TBLPTR++;
640-
#elif defined(__18CXX)
641-
// Start the write process: for PIC18, first need to reposition tblptr back into memory block that we want to write to.
642-
_asm tblrdpostdec _endasm
643-
644-
// Write flash memory, enable write control.
645-
EECON1 = 0x84;
646-
UnlockAndActivate(NVM_UNLOCK_KEY);
647-
TBLPTR++;
648644
#endif
649645
}//while(i-- > 0)
650646
}//if(foundDifference == true)

drivers/sd_spi/sd_spi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ please contact [email protected]
2727
#include <stdint.h>
2828
#include <stdbool.h>
2929

30-
#include <fileio_media.h>
30+
#include "fileio_media.h"
3131

3232
/*****************************************************************************/
3333
/* Custom structures and definitions */

inc/fileio.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ please contact [email protected]
2929
#include "fileio_config.h"
3030
#include "system.h"
3131

32-
#include <fileio_media.h>
32+
#include "fileio_media.h"
3333

3434

3535
/*******************************************************************/
@@ -404,9 +404,9 @@ typedef union
404404
{
405405
struct
406406
{
407-
uint16_t day : 5; // Day (1-31)
408-
uint16_t month : 4; // Month (1-12)
409-
uint16_t year : 7; // Year (number of years since 1980)
407+
unsigned day : 5; // Day (1-31)
408+
unsigned month : 4; // Month (1-12)
409+
unsigned year : 7; // Year (number of years since 1980)
410410
} bitfield;
411411
uint16_t value;
412412
} FILEIO_DATE;
@@ -416,9 +416,9 @@ typedef union
416416
{
417417
struct
418418
{
419-
uint16_t secondsDiv2 : 5; // (Seconds / 2) ( 1-30)
420-
uint16_t minutes : 6; // Minutes ( 1-60)
421-
uint16_t hours : 5; // Hours (1-24)
419+
unsigned secondsDiv2 : 5; // (Seconds / 2) ( 1-30)
420+
unsigned minutes : 6; // Minutes ( 1-60)
421+
unsigned hours : 5; // Hours (1-24)
422422
} bitfield;
423423
uint16_t value;
424424
} FILEIO_TIME;

0 commit comments

Comments
 (0)