User manual

Table Of Contents
376
mikoC PRO for PIC32
MikroElektronika
Mmc_Fat_Get_File_Date_Modied
Mmc_Fat_Get_File_Size
Prototype
void Mmc_Fat_Get_File_Date_Modied(unsigned int *year, unsigned short
*month, unsigned short *day, unsigned short *hours, unsigned short *mins);
Description Retrieves the last modication date/time for the currently selected le. Seconds are not being retrieved
since they are written in 2-sec increments.
Parameters - year: buffer to store year attribute to. Upon function execution year attribute is returned through this
parameter.
- month: buffer to store month attribute to. Upon function execution month attribute is returned through
this parameter.
- day: buffer to store day attribute to. Upon function execution day attribute is returned through this
parameter.
- hours: buffer to store hours attribute to. Upon function execution hours attribute is returned through
this parameter.
- mins: buffer to store minutes attribute to. Upon function execution minutes attribute is returned
through this parameter.
Returns Nothing.
Requires The le must be assigned, see Mmc_Fat_Assign.
Example
// get modication Date/time of le
unsigned yr;
char mnth, dat, hrs, mins;
...
le_Name = “MYFILEABTXT”;
Mmc_Fat_Assign(le_Name);
Mmc_Fat_Get_File_Date_Modied(&yr, &mnth, &day, &hrs, &mins);
Prototype
unsigned long Mmc_Fat_Get_File_Size();
Description This function reads size of the currently assigned le in bytes.
Parameters None.
Returns This function returns size of active le (in bytes).
Requires MMC/SD card and MMC library must be initialized for le operations. See Mmc_Fat_Init.
The le must be previously assigned. See Mmc_Fat_Assign.
Example
unsigned long my_le_size;
...
my_le_size = Mmc_Fat_Get_File_Size();
Notes None.