ESP32 FAT_DATE dos not work...

Posts: 31
Joined: Thu Aug 09, 2018 9:56 pm

ESP32 FAT_DATE dos not work...

Postby Pcborges » Thu Aug 09, 2018 11:26 pm

Hi, I am porting a project that runs on a Mega256 where I use the following code to inform the SD routine to add date creation/update properly:
The code below does not work with ESP32's SD.h

What should I use to provide the SD files with time stamps?

Assistance welcome.

Code: Select all

//function to supply datetime to SD file system
void dateTime(uint16_t* date, uint16_t* time)
// return date using FAT_DATE macro to format fields
*date = FAT_DATE(Clock.getYear() - 48, Clock.getMonth(Century), Clock.getDate());
// return time using FAT_TIME macro to format fields
*time = FAT_TIME(Clock.getHour(h12, PM), Clock.getMinute(), Clock.getSecond());
Compilation time error:
exit status 1
'FAT_DATE' was not declared in this scope

Who is online

Users browsing this forum: No registered users and 11 guests