Hanna
Sourcecode Batteriemanagementsystem
FAT Date-Time Support for SD-Cards

This function is the link between the hardware RTC and the timekeeping function to the sd-reader code.

Parameter
yearPointer to year
monthPointer to month
dayPointer to day
hourPointer to hour
minPointer to min
secPointer to sec


This function is the link between the hardware RTC and the timekeeping function to the sd-reader code.

To enable access time stamping in the application, set

#define FAT_DATETIME_SUPPORT 1

in fat_config.h.

The documentation indicates that functions fat_set_file_modification_date() and fat_set_file_modification_time() are available, but in fact they’re not.
The way to get time stamps to work is to define a function:

void get_datetime(uint16_t* year, uint8_t* month, uint8_t* day, uint8_t* hour, uint8_t* min, uint8_t* sec);

which is also defined in fat_config.h and gets called by the sd-reader code.
You write this function so that your timekeeping code fills in the values.