| Description | | The fs_get_date function returns the current date. The Flash File System calls the function to update the file write or file access date in the File Information Record. The function packs the year, month, and day values in the 3 least significant bytes of the 4-byte return value. The fs_get_date function is part of RL-FlashFS. The prototype is defined in file_config.h. You can customize the function in fs_time.c note - You must complete the fs_get_date function yourself.
- To replace the default file time functions from the FlashFS library with your own, both fs_get_time and fs_get_date functions must be provided in your project.
|
| Example | |
U32 fs_get_date (void) {
/* Return Current Date for FAT File Time stamp. */
U32 d,m,y,date;
/* Modify here, add a system call to read RTC. */
/* Day: 1 - 31 */
/* Month: 1 - 12 */
/* Year: 1980 - 2107 */
d = 1;
m = 11;
y = 2006;
date = (y << 16) | (m << 8) | d;
return (date);
}
|