User manual

Table Of Contents
mikroC PRO for PIC32
MikroElektronika
301
Parameters
Returns - Number of the start sector for the newly created swap le, if there was enough free space on CF
card to create le of required size.
- 0 - otherwise.
Requires CF card and CF library must be initialized for le operations. See Cf_Fat_Init.
Example
//-------------- Try to create a swap le with archive atribute, whose size
will be at least 1000 sectors.
// If it succeeds, it sends the No. of start sector over UART
unsigned long size;
...
size = Cf_Fat_Get_Swap_File(1000, “mikroE.txt”, 0x20);
if (size) {
UART1_Write(0xAA);
UART1_Write(Lo(size));
UART1_Write(Hi(size));
UART1_Write(Higher(size));
UART1_Write(Highest(size));
UART1_Write(0xAA);
}
Notes Long File Names (LFN) are not supported.
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