Datasheet

285
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroPASCAL PRO for AVR
CHAPTER 6
Description
Note: Long File Names (LFN) are not supported.
Requires
MMC/SD card and MMC library must be initialized for file operations. See
Mmc_Fat_Init.
Example
//-------------- Try to create a swap file with archive atribute,
whose size will be at least 1000 sectors.
// If it succeeds, it sends No. of start sector
over USART
var size : dword;
...
size := Mmc_Fat_Get_Swap_File(1000, 'mikroE.txt', 0x20);
if (size <> 0) then
begin
UART1_Write(0xAA);
UART1_Write(Lo(size));
UART1_Write(Hi(size));
UART1_Write(Higher(size));
UART1_Write(Highest(size));
UART1_Write(0xAA);
end;
Bit Mask Description
0 0x01 Read Only
1 0x02 Hidden
2 0x04 System
3 0x08 Volume Label
4 0x10 Subdirectory
5 0x20 Archive
6 0x40 Device (internal use only, never found on disk)
7 0x80 Not used