Datasheet
Mmc_Fat_Set_File_Date
Mmc_Fat_Get_File_Date
332
MIKROELEKTRONIKA - SOFTWARE AND HARDWARE SOLUTIONS FOR EMBEDDED WORLD
Libraries
mikroC PRO for AVR
CHAPTER 6
Prototype
void Mmc_Fat_Set_File_Date(unsigned int year, unsigned short
month, unsigned short day, unsigned short hours, unsigned short
mins, unsigned short seconds);
Returns Nothing.
Description
Writes system timestamp to a file. Use this routine before each writing to file;
otherwise, the file will be appended an unknown timestamp.
Requires
The file must be assigned, see Mmc_Fat_Assign. Also, file pointer must be ini-
tialized; see Mmc_Fat_Reset.
Example
// April 1st 2005, 18:07:00
Mmc_Fat_Set_File_Date(2005, 4, 1, 18, 7, 0);
Prototype
void Mmc_Fat_Get_File_Date(unsigned int *year, unsigned short
*month, unsigned short *day, unsigned short *hours, unsigned
short *mins);
Returns Nothing.
Description
Retrieves date and time for the currently selected file. Seconds are not being
retrieved since they are written in 2-sec increments.
Requires The file must be assigned, see Mmc_Fat_Assign.
Example
// get Date/time of file
unsigned yr;
char mnth, dat, hrs, mins;
...
file_Name = "MYFILEABTXT";
Mmc_Fat_Assign(file_Name);
Mmc_Fat_Get_File_Date(yr, mnth, dat, hrs, mins);